Go Back   The macosxhints Forums > OS X Help Requests > System



Reply
 
Thread Tools Rate Thread Display Modes
Old 11-07-2007, 07:38 PM   #1
tw
Hall of Famer
 
Join Date: Apr 2007
Posts: 4,263
odd man page question...

I've been playing with launchd in Leopard, which seems to have been fixed, thankyouverymuch, but I noticed that the launchd man page that I get through terminal is different than the launchd man page that's in Apple's developer connection site. I'm trying to figure out why... is it because I installed Leopard via update (which worked well, otherwise, but might not have changed the man pages?), or is something else going on? and what can I do about it, if anything? very perplexing...
__________________
Philosophy is a battle against the bewitchment of our intelligence by means of language. -LW-
tw is offline   Reply With Quote
Old 11-07-2007, 07:54 PM   #2
hayne
Site Admin
 
Join Date: Jan 2002
Location: Montreal
Posts: 32,473
Well, the online page you linked to has a date of September 30, 2004, so maybe the man page you are reading is more up to date.
__________________
hayne.net/macosx.html
hayne is online now   Reply With Quote
Old 11-07-2007, 08:04 PM   #3
tw
Hall of Famer
 
Join Date: Apr 2007
Posts: 4,263
Quote:
Originally Posted by hayne
Well, the online page you linked to has a date of September 30, 2004, so maybe the man page you are reading is more up to date.

well, that's as may be, but (1) it's the man page on the developer connection, so I doubt it's 3 years out of date, and (2) it refers to the onDemand feature as deprecated in 10.5, which means it must be relatively current. I think the 2004 refers to Darwin, not to this particular man page. I don't have any doubts that the online version is more current than the one on my machine, I'm just trying to figure out the disconnect and what (if anything) can be done about it.
__________________
Philosophy is a battle against the bewitchment of our intelligence by means of language. -LW-
tw is offline   Reply With Quote
Old 11-07-2007, 08:13 PM   #4
hayne
Site Admin
 
Join Date: Jan 2002
Location: Montreal
Posts: 32,473
Do you have the Apple developer tools installed?
That might install a different version of the man page.
__________________
hayne.net/macosx.html
hayne is online now   Reply With Quote
Old 11-07-2007, 09:03 PM   #5
tw
Hall of Famer
 
Join Date: Apr 2007
Posts: 4,263
I do, actually... do you think the one on the ADC site is prerelease? I'm not even sure how you would check whether your man pages are synched with the software you have installed. maybe I should just see if I can reinstall them from the developer tools installer on the leopard DVD, on the assumption that those should be up to date
__________________
Philosophy is a battle against the bewitchment of our intelligence by means of language. -LW-
tw is offline   Reply With Quote
Old 11-07-2007, 11:40 PM   #6
Hal Itosis
Hall of Famer
 
Join Date: Apr 2002
Posts: 3,315
Thumbs up [OFF]: onDemand replaced by KeepAlive in 10.5

Quote:
Originally Posted by tw
it refers to the onDemand feature as deprecated in 10.5

It is?!?!?!?!?

Cool. Wow, that's big.
[Search these forums to find my gripes with OnDemand... if interested.]

Anyway... I'm off to test the new 'KeepAlive'.
[heh... though minor, one of my complaints was that "OnDemand" was very poorly named.]

Anyway, thanks.
Now back to our regularly scheduled thread... . . .

-HI-

EDIT: actually, I will say that my belief is that those online pages
are definitely more complete, and possibly *more* up-to-date than
what gets installed on our HDs. For example, chmod(2) and stat(2)
have existed online since *early* Tiger... if not before. Here we are
in Leopard, and we still don't have chmod(2) or stat(2) on our Macs.

In fact, the entire section 2: /usr/share/man/man2 is lacking!

Last edited by Hal Itosis; 11-08-2007 at 12:01 AM.
Hal Itosis is offline   Reply With Quote
Old 11-07-2007, 11:54 PM   #7
hayne
Site Admin
 
Join Date: Jan 2002
Location: Montreal
Posts: 32,473
1) What in particular is different between what you get from 'man 5 launchd.plist' and the online man page that you linked to above?

2) You can get the source for launchd.plist(5) man page as part of the Darwin open source:
http://www.opensource.apple.com/darw...aunchd.plist.5
__________________
hayne.net/macosx.html
hayne is online now   Reply With Quote
Old 11-08-2007, 12:04 AM   #8
tw
Hall of Famer
 
Join Date: Apr 2007
Posts: 4,263
well, when I type man 5 launchd.plist I get a different version (the tiger version, I think - onDemand is listed as current, and keepAlive doesn't exist). here's an excerpt

Quote:
XML PROPERTY LIST KEYS
The follow keys can be used to describe the configuration details of your daemon or agent.
Property lists files are expected to have their name end in ".plist" but that is not strictly
required.

Label <string>
This required key uniquely identifies the job to launchd.

Disabled <boolean>
This optional key is used to disable your job. The default is false.

UserName <string>
This optional key specifies the user to run the job as. The default is the user who submitted
the job to launchd.

GroupName <string>
This optional key specifies the user to run the job as. The default is the group of the user
who submitted the job to launchd.

inetdCompatibility <dictionary>
The presence of this key specifies that the daemon expects to be run as if it were launched
from inetd(8). This flag is incompatible with the ServiceIPC key.

Wait <boolean>
This flag corresponds to the "wait" or "nowait" option of inetd(8).

ProgramArguments <array of strings>
This required key maps to the second argument of execvp(3).

Program <string>
This optional key maps to the first argument of execvp(3). If this key is missing, then the
first element of the array of strings provided to the ProgramArguments will be used instead.

OnDemand <boolean>
This optional key is used to control whether your job is launched based on demand or to be kept
continuously running. The default is true.

RunAtLoad <boolean>
This optional key is used to control whether your job is launched once at the time the job is
loaded. The default is false.

RootDirectory <string>
This optional key is used to specific a directory to chroot(2) to before running the job.

WorkingDirectory <string>
This optional key is used to specific a directory to chdir(2) to before running the job.

ServiceDescription <string>
This optional key is used to specify a human readable description of the purpose of the job.

EnvironmentVariables <dictionary of strings>
This optional key is used to specify additional environmental variables to be setup before run-
ning the job.

I'm really starting to think that the man files didn't change when I updated to leopard; probably should have done an archive and install...
__________________
Philosophy is a battle against the bewitchment of our intelligence by means of language. -LW-
tw is offline   Reply With Quote
Old 11-08-2007, 12:10 AM   #9
tw
Hall of Famer
 
Join Date: Apr 2007
Posts: 4,263
Quote:
Originally Posted by Hal Itosis
It is?!?!?!?!?

Cool. Wow, that's big.

lol - pardon my saying so, but man do you need a life...

Quote:
Originally Posted by Hal Itosis
EDIT: actually, I will say that my belief is that those online pages
are definitely more complete, and possibly *more* up-to-date than
what gets installed on our HDs. For example, chmod(2) and stat(2)
have existed online since *early* Tiger... if not before. Here we are
in Leopard, and we still don't have chmod(2) or stat(2) on our Macs.

In fact, the entire section 2: /usr/share/man/man2 is lacking!

well that's just goofy, particularly if you've installed developer tools (which might imply that you have a ned for up-to-date manuals...)
__________________
Philosophy is a battle against the bewitchment of our intelligence by means of language. -LW-
tw is offline   Reply With Quote
Old 11-08-2007, 12:14 AM   #10
hayne
Site Admin
 
Join Date: Jan 2002
Location: Montreal
Posts: 32,473
Get my script 'grep_pkg' from: http://hayne.net/MacDev/Bash/
and see what you get from the command:
grep_pkg launchd.plist.5

Here's what I get on my iBook running 10.4.10:
Code:
% grep_pkg launchd.plist.5 
./usr/share/man/man5/launchd.plist.5    100644  0/0     10074   2182961514
*** Essentials.pkg ***
------------------------------
./usr/share/man/man5/launchd.plist.5    100644  0/0     11837   741382211
./usr/share/man/man5/launchd.plist.5    100644  0/0     11837   741382211
*** MacOSXUpdCombo10.4.7PPC.pkg ***
------------------------------
That shows that the man page source file launchd.plist.5 came as part of the "Essentials" package when I installed OS X and then it was updated in the 10.4.7 update.
__________________
hayne.net/macosx.html

Last edited by hayne; 11-08-2007 at 12:19 AM.
hayne is online now   Reply With Quote
Old 11-08-2007, 12:19 AM   #11
hayne
Site Admin
 
Join Date: Jan 2002
Location: Montreal
Posts: 32,473
Quote:
Originally Posted by Hal Itosis
Here we are
in Leopard, and we still don't have chmod(2) or stat(2) on our Macs.

In fact, the entire section 2: /usr/share/man/man2 is lacking!

I'm on Tiger, but I have a man page for chmod(2):

Code:
% grep_pkg chmod.2
./usr/share/man/man2/chmod.2    100444  0/0     5918    874606078
./usr/share/man/man2/fchmod.2   100444  0/0     17      2603906086
*** DevDocumentation.pkg ***
------------------------------
Code:
% ls -l /usr/share/man/man2/chmod.2
-r--r--r--   1 root  wheel  5918 Jul 21  2006 /usr/share/man/man2/chmod.2
As seen from above, it came with the Developer tools.
__________________
hayne.net/macosx.html
hayne is online now   Reply With Quote
Old 11-08-2007, 12:27 AM   #12
tw
Hall of Famer
 
Join Date: Apr 2007
Posts: 4,263
ok, mine is essentially the same as yours, except it was updated in the 10.4.10 update. that means either that 10.5 didn't update the man pages in my case, or 10.5 isn't updating man pages at all. does anyone who did an archive and install or erase and install for 10.5 get different results?

Code:
./usr/share/man/man5/launchd.plist.5    100644  0/0     10074   2182961514
*** Essentials.pkg ***
------------------------------
./usr/share/man/man5/launchd.plist.5    100644  0/0     11837   741382211
./usr/share/man/man5/launchd.plist.5    100644  0/0     11837   741382211
*** MacOSXUpdCombo10.4.10PPC.pkg ***
------------------------------
cool tool, by the way. I'm keeping this one, and a couple of others I found on your site. unix is not my forte, and these will make good study guides.
__________________
Philosophy is a battle against the bewitchment of our intelligence by means of language. -LW-
tw is offline   Reply With Quote
Old 11-08-2007, 12:33 AM   #13
Hal Itosis
Hall of Famer
 
Join Date: Apr 2002
Posts: 3,315
Quote:
Originally Posted by tw
I'm really starting to think that the man files didn't change when I updated to leopard; probably should have done an archive and install.

I knew 'update' style upgrades were bad... but that's ridiculous.

How could *any* Leopard install not include the proper man pages
for a function as vital to the OS as launchd is. I'd ask you which
version of launchd you have, but apparently it's unable to tell us:

$ launchd -v; launchd -V; launchd --version
launchd: illegal option -- v
launchd: ignoring unknown arguments
launchd: This program is not meant to be run directly.


Quote:
Originally Posted by tw
lol - pardon my saying so, but man do you need a life...

You're excused. [Sounds like you never experienced the freaky behavior
of OnDemand=false in a user ~/Library/LaunchAgents/*.plist ...luckily.]


Quote:
Originally Posted by tw
well that's just goofy, particularly if you've installed developer tools (which might imply that you have a ned for up-to-date manuals...)

No developer tools. I want to do only everything "normal" (default) OSX users can.

Last edited by Hal Itosis; 11-08-2007 at 12:38 AM.
Hal Itosis is offline   Reply With Quote
Old 11-08-2007, 12:36 AM   #14
tw
Hall of Famer
 
Join Date: Apr 2007
Posts: 4,263
Quote:
Originally Posted by hayne
I'm on Tiger, but I have a man page for chmod(2):

I'm on leopard, and I have folders for man 1 through man 9, inclusive (not sure how many there are supposed to be...) some of them haven't been updated since 2005, though, which makes me think Apple might be a little lax about this particular aspect of unix.
__________________
Philosophy is a battle against the bewitchment of our intelligence by means of language. -LW-
tw is offline   Reply With Quote
Old 11-08-2007, 12:41 AM   #15
tw
Hall of Famer
 
Join Date: Apr 2007
Posts: 4,263
Quote:
Originally Posted by Hal Itosis
No developer tools. I want to do only everything "normal" (default) OSX users can.

there's such a thing as a 'normal' os X user?
__________________
Philosophy is a battle against the bewitchment of our intelligence by means of language. -LW-
tw is offline   Reply With Quote
Old 11-08-2007, 12:48 AM   #16
Hal Itosis
Hall of Famer
 
Join Date: Apr 2002
Posts: 3,315
Okay... calm down gentlemen.

I don't have Dev. Tools, so I guess I don't "deserve" man2

Now:

Quote:
Originally Posted by tw
that means either that 10.5 didn't update the man pages in my case, or 10.5 isn't updating man pages at all. does anyone who did an archive and install or erase and install for 10.5 get different results?

Yes... I did a clean Leopard install (sans Developer Tools) and my
man 5 launchd.plist has:

OnDemand <boolean>
This key was used in Mac OS X 10.4 to control whether a job was kept alive or not. The default was
true. This key has been deprecated and replaced in Mac OS X 10.5 with the more powerful KeepAlive
option.

KeepAlive <boolean or dictionary of stuff>
This optional key is used to control whether your job is to be kept continuously running or to let
demand and conditions control the invocation. The default is false and therefore only demand will start
the job. The value may be set to true to unconditionally keep the job alive. Alternatively, a dictio-
nary of conditions may be specified to selectively control whether launchd keeps a job alive or not. If
multiple keys are provided, launchd ORs them, thus providing maximum flexibility to the job to refine
the logic and stall if necessary. If launchd finds no reason to restart the job, it falls back on
demand based invocation. Jobs that exit quickly and frequently when configured to be kept alive will
be throttled to converve system resources.



Quote:
Originally Posted by tw
there's such a thing as a 'normal' os X user?

there's always the exception that disproves the rule.

Last edited by Hal Itosis; 11-08-2007 at 12:50 AM.
Hal Itosis is offline   Reply With Quote
Old 11-08-2007, 12:49 AM   #17
hayne
Site Admin
 
Join Date: Jan 2002
Location: Montreal
Posts: 32,473
Quote:
Originally Posted by Hal Itosis
No developer tools. I want to do only everything "normal" (default) OSX users can.

Since chmod(2) is a system call (i.e. only accessible programmatically), it makes sense that its man page is only installed with the Developer tools.
__________________
hayne.net/macosx.html
hayne is online now   Reply With Quote
Old 11-08-2007, 12:59 AM   #18
Hal Itosis
Hall of Famer
 
Join Date: Apr 2002
Posts: 3,315
Doesn't mean I don't want to *read* about it.
Take stat(2) for instance. Lot of good info there
that helps one understand stat(1) a little better.
Hal Itosis is offline   Reply With Quote
Old 11-08-2007, 01:00 AM   #19
tw
Hall of Famer
 
Join Date: Apr 2007
Posts: 4,263
Quote:
Originally Posted by Hal Itosis
Okay... calm down gentlemen.

lol - who you calling a gentleman????!!!

Quote:
Originally Posted by Hal Itosis
Yes... I did a clean Leopard install (sans Developer Tools) and my
man 5 launchd.plist has: <correct version>

ok, so this looks like a weirdness of using the update approach. live and learn, live and learn. guess I'll see if I can ferret the proper man pages out of the leopard installer when I get home.
__________________
Philosophy is a battle against the bewitchment of our intelligence by means of language. -LW-
tw is offline   Reply With Quote
Old 11-08-2007, 01:08 AM   #20
hayne
Site Admin
 
Join Date: Jan 2002
Location: Montreal
Posts: 32,473
Quote:
Originally Posted by Hal Itosis
Doesn't mean I don't want to *read* about it.
Take stat(2) for instance. Lot of good info there
that helps one understand stat(1) a little better.

It's a bug that the info isn't available via 'man 1 stat'.
__________________
hayne.net/macosx.html
hayne is online now   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 06:47 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.