Re: (no subject)
Re: (no subject)
- Subject: Re: (no subject)
- From: Randy Ford <email@hidden>
- Date: Fri, 7 Feb 2003 20:40:57 -0600
On Friday, February 7, 2003, at 05:38 PM, David Mackler wrote:
Yeah, the re-parenting to init is causing other side effects. In
my case, quitting my (non quartz-wm) window manager leaves both
the X11.app running, along with other apps (docklings, mostly)
started by the window manager. Since they are reparented, they keep
on living after quitting the wm (started as the final statement in
my .xinitrc with 'exec').
I did open a bug on this, so perhaps it will be in a future release ;-)
David
On Fri, Feb 07, 2003 at 01:15:08PM -0800, Randal L. Schwartz wrote:
"Rene" == Rene Tio <email@hidden> writes:
Rene> In contrast, here is Apple's X11:
Rene> PID PPID COMMAND
Rene> 173 1 /System/Library/CoreServices/WindowServer -daemon
Rene> 540 173 /Applications/X11.app/Contents/MacOS/X11
-psn_0_1703937
Rene> 541 540 /Applications/X11.app/Contents/MacOS/X11
Rene> --xquartz-be-xinit -noreset -nolisten tcp -psn_0_1703937
Rene> 543 1 sh /Users/tor/.xinitrc
Rene> 565 543 /usr/X11R6/bin/quartz-wm
Rene> Note that .xinitrc is started directly from the init process
(PID 1)
Rene> and does not trace it's ancestry back to a login shell.
No, that's a bad read. I'm almost certain that PID 1 didn't *spawn*
that process. I'm just as almost certain that the parent process
of that process has exited, creating an orphaned process. The rule
is that orphaned processes become "children of init".
As Randal L. Schwartz posted, this doesn't have anything to do with
them becoming children of init. The problem is that the shell
environment is never set up to begin with. To demonstrate this, I
started a shell in the Terminal.app that was fully initialized. I then
executed the program that X11.app starts. From ps -axfww,
randy 28770 9072 9072 1989e88 0 S ?? 0:00.01
/Applications/X11.app/Contents/MacOS/X11 -psn_0_11796481
randy 28771 28770 9072 1989e88 0 S ?? 0:01.67
/Applications/X11.app/Contents/MacOS/X11 --xquartz-be-xinit -noreset
-auth /Users/randy/.Xauthority -psn_0_11796481
The program that x11.app starts is
/Applications/X11.app/Contents/MacOS/X11 -psn_0_11796481. Starting it
from the initialized shell in the Terminal, with X11 _not_ running:
/Applications/X11.app/Contents/MacOS/X11&
ps will show that .xinitrc as well as any shells spawned by the
Application menu are re-parented to init. However, if you type 'env'
in the xterms, you will see that the environment is properly
initialized. Also, since the PATH is set up properly, you don't need
the path in the command in the Application menu.
This seems to work correctly; however, I am not familiar enough with
the OS X side of things to understand what else X11.app may be doing;
therefore I can't recommend just starting X11 like this. It does show,
however, that this problem is not really a problem with how the main
X11 code is written, but rather with the fact that it doesn't ever set
up a proper login environment in the first place.
randy.
--
Mach my words: The Children of Init shall Unite! Don't allow zombies
to hold them: ensure your orphans are united with the mighty Init.
_______________________________________________
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.