[EMAIL PROTECTED] wrote:

> Good evening all .
> I am' trying to use the NOHANG function in my script for to maintain on

NOHAND(WNOHANG) is not a function :-)

> live a process until the child process end its job.
> but something go wrong .
> when I run the script all work fine until i must to esc form the "cicle"
> ops! here the program sometime esc and sometime no!!
> that's i think because not everytime the program start with the same
> process, so when the job is finish this seems to be append and don't esc.
> 

you fork and then both of your parent and child process is scanning for a 
port number to use. what fork does is that dups the current process. the 
child process have it's own stack, memory address etc. i don't think you 
post any code after you find a good port to use. did you? if all work is 
being done on the parent but is actually the child process that finds the 
first open port to use, you are out of luck. you simply can't retrive what 
the child process found. that's because the child process has it's own 
stack and memory addres...etc. if your WNOHAND flag is simply for that 
purpose, it simply won't work. if you can post what you really want to do 
AFTER an open port is found, it might be more helpful.

> First of all Sorry for my ugly english, and I think that somebody can
> help me.

don't worry. mine is bad too :-)

david

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to