Date: Thu, 14 Sep 2006 01:31:59 +0200 From: Marcin Cieslak <saper@SYSTEM.PL> To: emulation@freebsd.org Subject: linux_waitpid() hangs: sqlplus on exit of external editor Message-ID: <450894EF.1020101@SYSTEM.PL>
next in thread | raw e-mail | index | archive | help
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 <hangs, you can still type> 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 >>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?450894EF.1020101>