From owner-freebsd-emulation@FreeBSD.ORG Wed Sep 13 23:32:18 2006 Return-Path: X-Original-To: emulation@freebsd.org Delivered-To: freebsd-emulation@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1221716A5F4 for ; Wed, 13 Sep 2006 23:32:18 +0000 (UTC) (envelope-from saper@SYSTEM.PL) Received: from mail01.ish.de (pip252.ish.de [80.69.98.252]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4B89A43D45 for ; Wed, 13 Sep 2006 23:32:17 +0000 (GMT) (envelope-from saper@SYSTEM.PL) Received: from [81.210.201.87] (account saper@iesy.net HELO saperski.saper.info) by mail-fe-01.mail01.ish.de (CommuniGate Pro SMTP 5.0.6) with ESMTPSA id 75750021 for emulation@freebsd.org; Thu, 14 Sep 2006 01:32:15 +0200 Received: from [127.0.0.1] (saperski.saper.info [127.0.0.1]) by saperski.saper.info (8.13.8/8.13.8) with ESMTP id k8DNVxRR041467 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Thu, 14 Sep 2006 01:32:08 +0200 (CEST) (envelope-from saper@SYSTEM.PL) Message-ID: <450894EF.1020101@SYSTEM.PL> Date: Thu, 14 Sep 2006 01:31:59 +0200 From: Marcin Cieslak User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.0.6) Gecko/20060912 SeaMonkey/1.0.4 MIME-Version: 1.0 To: emulation@freebsd.org Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: linux_waitpid() hangs: sqlplus on exit of external editor X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Sep 2006 23:32:18 -0000 Oracle sqlplus utility may invoke external $EDITOR to edit last query. Under linux emulation sqlplus hangs however after it returns from the editor. It does not matter if binary is FreeBSD (tried /usr/bin/vi, /usr/bin/ed or Linux - tried /compat/linux/bin/ls). Tried Oracle XE sqlplus as well as Oracle Instant Client sqlplus. Sample session (/usr/bin/ed as the editor): % ktrace sqlplus / as sysdba SQL*Plus: Release 10.2.0.1.0 - Production on Thu Sep 14 01:13:09 2006 Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to: Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production SQL> set hea off SQL> select * from dual; X SQL> edit Wrote file afiedt.buf 21 ,p select * from dual / w 21 q ps: UID PID PPID CPU PRI NI VSZ RSS MWCHAN STAT TT TIME COMMAND 99 41365 41350 0 8 0 20528 6996 wait I+ p1 0:00.09 sqlplus / as sysdba Child process is gone (child process trace shows normal exit(0)). End of linux_kdump (invoking process only). 41365 sqlplus CALL write(0x1,0x490d0000,0x16) 41365 sqlplus GIO fd 1 wrote 22 bytes "Wrote file afiedt.buf " 41365 sqlplus RET write 22/0x16 41365 sqlplus CALL linux_brk(0x80fc000) 41365 sqlplus RET linux_brk 135249920/0x80fc000 41365 sqlplus CALL linux_fork 41365 sqlplus RET linux_fork 41367/0xa197 41365 sqlplus CALL linux_rt_sigaction(0x2,0xbfbfb294,0xbfbfb208,0x8) 41365 sqlplus RET linux_rt_sigaction 0 41365 sqlplus CALL linux_rt_sigaction(0x3,0xbfbfb294,0xbfbfb208,0x8) 41365 sqlplus RET linux_rt_sigaction 0 41365 sqlplus CALL linux_rt_sigaction(0x11,0xbfbfb294,0xbfbfb208,0x8) 41365 sqlplus RET linux_rt_sigaction 0 41365 sqlplus CALL linux_waitpid(0xa197,0xbfbfb648,0) I have attempted to reproduce the problem using system() or fork() and execve() to reproduce this behaviour behaves correctly, i.e. Linux binary invoking FreeBSD binary works fine. Any ideas where the problem might be? -- << Marcin Cieslak // saper@system.pl >>