Hi! Good catch :)
On Wed 20 Aug 2014 22:44, [email protected] writes: > I have a question about the fork() system call at /src/d8-posix.cc:481: > > - If fork() returns with an error code -1, wouldn't the kill() system > call a few lines below at /src/d8-posix.cc:502 kill every process the > user is allowed to kill (besides init) as per the Linux kill() man page ? I think probably it will block in the ChildLaunchedOK call, as the FD is never closed by the child. > I'm a C++ noob, but just by looking at the code it doesn't seem like > wrapping the pid with ZombieProtector would really handle a -1 error > code from the fork() system call. > > I'm writing this post because after reading an article called "fork() > can fail: this is important", I started looking at C/C++ libraries that > I use for non-error-handled fork() system calls and I think that this > could be an example of one. > > Did I miss something ? Nope, it's a good catch :) Happily we don't use that function anywhere except in a tool called the "tickprocessor", but it's still a thing to fix. I'll take care of it unless you want to; let me know if so. Cheers, Andy -- -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev --- You received this message because you are subscribed to the Google Groups "v8-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
