Is it possible to start a process with exec
and have that process run in the background, and (unlike System()
), will that process be kill
ed once an interrupt signal is passed to the parent process that created it?
views:
185answers:
1
+1
A:
Yeah. Ignoring SIGINT is a behavior specific to system(). If you roll your own system() using fork() and execl(), you won't get that.
Of course, unless you're really careful you're going to make zombies.
chaos
2009-02-24 14:48:52
Not sure about the zombie comment - if the parent ignores the SIGCHLD signal, no zombies will be created. Also, the process can wait for its child (or children) to die, just like system() does - or it can run asynchronously with the child running at the same time.
Jonathan Leffler
2009-02-27 08:22:57
Those options are pretty much what I mean by "being really careful". :)
chaos
2009-02-27 16:39:28