login
Header Space

 
 

why?

October 14, 2008 - 9:28am

normal processes can't avoid to get scheduled out, and as unix programs work without that capability this is not needed and would indeed be dangerous. but why do you want to do that? if you don't want the child process to run because it could exit and defeat the purpose of the kill(), that doesn't work with SMP anyway: the child could be running on another CPU.

if you just want to make sure the pid still refers to a child and not to another process: if you don't ignore SIGCHLD, the child will survive in half-dead state (as a zombie process) to reserve the pid until the parent process got the pid returned from wait(). if you didn't, your kill() will always hit your child, as intended, it just may me dead anyway.

Reply

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <b> <quote> <pre> <hr> <br> <p> <img> <blockquote> <font> <tt> <table> <tr> <i>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

speck-geostationary