www.nico.schottelius.org/software/cinit/browse_source/cinit-0.3pre15/doc/todo/0.3pre13.race-condition
Nico Schottelius 440caeb555 add cinit-0.3pre15
Signed-off-by: Nico Schottelius <nico@ikn.schottelius.org>
2009-09-23 08:01:33 +02:00

12 lines
763 B
Text

09:49 < telmich> is it possible, that if I fork() and call _exit(0) in the child, that the
_exit(0) is executed earlier than the fork() call returns in the parent?
09:49 < telmich> I'm having some race condition in cinit, where the pid is not yet updated in
the service structure, and the child exited before and thus cinit does not
update the service
09:49 < telmich> as being run
09:51 < telmich> rexy_: currently I'm thinking about implementing a lock before starting the
fork()
09:51 < telmich> rexy_: thus cinit will react differently, if the starting function is still
running
09:51 < telmich> rexy_: but I'm somehow confused, that fork() allows such race condition