in reply to Re: Re: Socket question Help!
in thread Socket question Help!

Yes, I should have stated that the code is untested. If you use waitpid(), you have to specify some flags, even if they are 0:
waitpit(-1,0);
Or, alternatively, just use wait:
wait; # Yep, just like that :)
Sorry about the mistake.

CU
Robartes-

Replies are listed 'Best First'.
Re: Re: Re: Re: Socket question Help!
by pg (Canon) on Nov 18, 2002 at 00:15 UTC
    When you use waitpid, the first parm is the process id or -1 (if you just want to kill time). For the second parm: you can specify it as 0, then the call is locked; or as 1, and the call is not blocked.

    I tested that, if you give an odd number for the second parm, the call does not block; but it blocks on even number. I realized that it's a bit map, and the last bit specifies whether the call is blocked.
    Does anyone know whether the rest bits are used?