about spawn flag

S

Sinan Nalkaya

hi, i am using os.spawn function, it works well but i need a flag that
allows function return the process id with exit/error code, is there
any or how can i do it, i can replace spawn with fork/exec if
necessary.
thanks.
 
A

Alex Martelli

Sinan Nalkaya said:
hi, i am using os.spawn function, it works well but i need a flag that
allows function return the process id with exit/error code, is there
any or how can i do it, i can replace spawn with fork/exec if
necessary.

os.P_WAIT waits until the spawned process finishes and returns its
exit/error code from the os.spawn call.


Alex
 
S

Sinan Nalkaya

thank you but also i need a pid.also react like an os.P_NOWAIT.
if i summarize,
child proccess immediately returns the pid, if child exits also
returns the exit/error code :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
474,283
Messages
2,571,405
Members
48,098
Latest member
inno vation

Latest Threads

Top