On Monday 20 October 2008 19:23, Jamie Lokier wrote: > Mike Frysinger wrote: > > > @@ -237,9 +237,9 @@ int main(int argc, char **argv) > > > send_output("----------------\n", 0, send_flag); > > > > > > if (outbuf) { > > > - pid = fork(); > > > + pid = vfork(); > > > if (pid < 0) { > > > - perror("fork"); > > > + perror("vfork"); > > > exit(1); > > > } > > > if (pid) { > > > > but this one is wrong because the child will call exit() after > > writing its log > > It's ok to call _exit() in a vfork-child, but not exit(). > So that should be changed. > > Writing the log in a vfork-child is dodgy, depending on how it's done.
If vfork returns < 0 then the fork failed and no child process was created, n'est-ce pas? So we are executing in the parent. -- Chris Gray /k/ Embedded Java Solutions BE0503765045 Embedded & Mobile Java, OSGi http://www.k-embedded-java.com/ [EMAIL PROTECTED] +32 3 216 0369 Skype: k.embedded.chris _______________________________________________ uClinux-dev mailing list uClinux-dev@uclinux.org http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by uclinux-dev@uclinux.org To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev