• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: (no subject)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (no subject)


  • Subject: Re: (no subject)
  • From: Rene Tio <email@hidden>
  • Date: Fri, 7 Feb 2003 16:51:47 -0800

On Friday, Feb 7, 2003, at 13:15 US/Pacific, 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".

I stand corrected. I thought it might have spawned a task somehow, but of course it would have the PPID of the parent... My bad.


Unless OSX is even weirder than I thought. :)

You'll need to watch "ps" very fast to see which process spawned the
xinit shell.  I'm guessing its number was "542" there. :)

Rene> Additionally
Rene> I am guessing the Menu bar Applications menu is started from one of
Rene> either process 540 or 541, which again traces it's way back to init
Rene> and not a login shell.


Again, not spawned from init though. Spawned from the login service. Maybe
currently inherited by init, but only through the standard orphaning.

Well, I don't know it if is spawned from login. I suspect since OS X does not use the standard login (at least I do not see it in "ps") that in the end when X11 is started one has no environment other than the default. Sourcing .profile/.bash*/.login in .xinitrc doesn't help since as others have pointed out it is too late in the cycle. Ideally I would have liked to have seen X11.app be more un*x like--- e.g., do what people have suggested with the wrapper script and spawn all sub-tasks from a login shell.


R.

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<email@hidden> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
_______________________________________________
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.

References: 
 >Re: (no subject) (From: email@hidden (Randal L. Schwartz))

  • Prev by Date: Re: X11 Application development advice needed
  • Next by Date: Re: Bash login shells with X11 (executing .bash_profile, .bashrc)
  • Previous by thread: Re: (no subject)
  • Next by thread: Re: (no subject)
  • Index(es):
    • Date
    • Thread