develooper Front page | perl.perl5.porters | Postings from December 2015

[perl #127080] perldoc for waitpid missing description for argumentvalue -1

Thread Previous
Bharat Pahalwani
December 31, 2015 13:37
[perl #127080] perldoc for waitpid missing description for argumentvalue -1
Message ID:
# New Ticket Created by  Bharat Pahalwani 
# Please include the string:  [perl #127080]
# in the subject line of all future correspondence about this issue. 
# <URL: >

Perl5's documentation for function waitpid ( lacks proper description:

    $kid = waitpid(-1, WNOHANG);

It is not described : 
   1. what's the use of -1
   2. and return value of waitpid(-1, WNOHANG) for different phases of child process


It is described in more detail in c manuals
   1) -1 will cause the parent to wait for any child process.
   2) waitpid(): on success, returns the process ID of the child whose state has changed; if WNOHANG was specified and one or more child(ren) specified by pid exist, but have not yet changed state, then 0 is returned. On error, -1 is returned.

Bharat Pahalwani
(If you are able to feel pain of others then u r religious else you are just
following the useless rules which are of no use )

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About