Re: xterms disappear when non-existent command given in background
Re: xterms disappear when non-existent command given in background
- Subject: Re: xterms disappear when non-existent command given in background
- From: William Julien <email@hidden>
- Date: Tue, 13 Jan 2004 19:31:20 -0800
On Jan 13, 2004, at 5:44 PM, Rich Cook wrote:
It seems worth noting that xterms showing login shells on non-MacOS X
hosts do not disappear when I background a non-existent command. But
both eterm and xterm on OS X do disappear, regardless of whether I
spawn the xterm from the menu of X11.app or by typing
xterm -e ssh localhost
in another xterm.
Appears to be a bug in Mac OS X's tcsh and csh implementations, as it
doesn't happen with sh?
I don't believe this is a problem with X11, but rather a bug in tcsh. I
use the korn shell,
so I can test without loosing my login shell. Consider the following:
# check my current shell
-->ps
PID TT STAT TIME COMMAND
531 std Ss 0:00.17 -ksh
# enter tcsh
-->tcsh
[callisto:~] moonbeam% ps
PID TT STAT TIME COMMAND
531 std Ss 0:00.17 -ksh
1822 std S 0:00.03 -csh
# do something "bad" in the forground (non zero return code)
[callisto:~] moonbeam% mkdir fred/tom/harry
mkdir: fred/tom: No such file or directory
# run the same in the background (fork-exec)
[callisto:~] moonbeam% mkdir fred/tom/harry &
[1] 1825
mkdir: fred/tom: No such file or directory
exit
# my tcsh shell has exited!
-->ps
PID TT STAT TIME COMMAND
531 std Ss 0:00.17 -ksh
William
On Jan 13, 2004, at 4:42 PM, Justin Walker wrote:
On Tuesday, January 13, 2004, at 04:12 PM, Thomas 'Tom' R. Treadway
III wrote:
That should only be the case if the X window, was started with a
login shell.
Running as a subshell: (asdfasdf &)
or
tcsh -c asdfasdf &
will cause less problem.
Can you explain this in a bit more detail? The behavior is
counter-intuitive, and not duplicated in other shells (in the 'sh'
family tree).
Why would a login shell exit if an attempt to launch an application
in the background failed because the app wasn't found?
In any case, if accurate, this is the answer we've been seeking, lo
these many moons...
Also the AppleTerminal has different characteristics.
We've noticed this.
Cheers,
Justin
--
Justin C. Walker, Curmudgeon-At-Large *
Institute for General Semantics | If you're not confused,
| You're not paying attention
*--------------------------------------
*-------------------------------*
_______________________________________________
x11-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/x11-users
X11 for Mac OS X FAQ: http://developer.apple.com/qa/qa2001/qa1232.html
Report issues, request features, feedback:
http://developer.apple.com/bugreporter
Do not post admin requests to the list. They will be ignored.
--
Richard Cook
Lawrence Livermore National Laboratory
Bldg-451 Rm-2043, Mail Stop L-561
7000 East Avenue, Livermore, CA, 94550, USA
phone (925) 423-9605 (work) fax (925) 423-8704
---
Information Management & Graphics Grp., Services & Development Div.,
Integrated Computing & Communications Dept.
(opinions expressed herein are mine and not those of LLNL)
_______________________________________________
x11-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/x11-users
X11 for Mac OS X FAQ: http://developer.apple.com/qa/qa2001/qa1232.html
Report issues, request features, feedback:
http://developer.apple.com/bugreporter
Do not post admin requests to the list. They will be ignored.
_______________________________________________
x11-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/x11-users
X11 for Mac OS X FAQ: http://developer.apple.com/qa/qa2001/qa1232.html
Report issues, request features, feedback: http://developer.apple.com/bugreporter
Do not post admin requests to the list. They will be ignored.