views:

105

answers:

4

There's multiple places in the Python documentation where it refers you to the C function "wait." For instance: "The exit status for the command can be interpreted according to the rules for the C function wait," in the commands and subprocess modules.

Where can I find this documentation? Apparently my Google-fu is not strong enough, or it's late enough at night that I'm being dumb. (But I figure this is probably a question that should be in Stack Overflow anyway.)

+4  A: 

$ man 2 wait (on Linux and Unix systems).

mipadi
Turns out (on Ubuntu, at least) you need to "apt-get install manpages-dev" before this shows up. And the man page doesn't exist on OS X for some reason. (Possibly because I haven't installed the dev tools.)
Schof
It should exist on OS X, because I checked before posting. Granted, I have the dev tools installed, but I thought it was installed anyway.
mipadi
+3  A: 

A search for man wait gives this as the top hit -- man is the Unix command for getting the manual page of something, so a search for man foobar is likely to reveal manual pages for foobar that happen to be online.

Alex Martelli
I find it amusing that a search for two simple, common words first yields a programming page. Or does Google understand what `man wait` means to programmers?
Chris Lutz
Google doesn't treat `man wait` any differently than it would any other two words, AFAIK -- the juxtaposition, treated following the usual algorithms, just happens to work right (which is part of why the algorithms _are_ picked as "usual"!-).
Alex Martelli
@Chris Lutz: yes, google does try to understand what you are searching for, not just treat all words the same. An interesting interview with the VP of core search: http://www.businessweek.com/the_thread/techbeat/archives/2009/10/googles_udi_man.html
ysth
+1  A: 

http://www.manpagez.com/man/2/wait/

(and at many other sources of man pages on the Internet).

mobrule
I'm a fan of opengroup myself, but it's all good.
Chris Lutz
+4  A: 

Here are some online pages for Linux...

http://manpages.ubuntu.com/manpages/jaunty/en/man2/wait.2.html

Sometimes the BSD pages have fewer extensions. They aren't always closer to pure posix but they are sometimes more "common denominator unix".

http://netbsd.gw.com/cgi-bin/man-cgi?wait+2+NetBSD-current

There was a time that man 2 wait would give you the answer on every unix box. However, these days the man pages are typically an optional package which you will have to hunt down, or at least identify its name. Because these change slightly over time they are associated with a given release of the OS, so there is no central authority. For typical use today in process management with scripting languages you may want to actually check with one of the various standards bodies, perhaps at http://www.opengroup.org/onlinepubs/009695399/functions/wait.html Finally, I should add that you can get these for cygwin on windows.

DigitalRoss