On Tuesday 19 February 2002 4:53 pm, Angus Leeming wrote: > On Tuesday 19 February 2002 4:42 pm, Jules Bean wrote: > > On Tue, Feb 19, 2002 at 04:28:39PM +0000, Angus Leeming wrote: > > > On Tuesday 19 February 2002 4:18 pm, John Levon wrote: > > > > On Tue, Feb 19, 2002 at 03:59:09PM +0000, Angus Leeming wrote: > > > > > > > > > I'd like to commit the attached patch. > > > > > > > > are you trying to confuse :) > > > > > > > > + if (pid<=0) { // Fork failed. > > > > + retval = 1; > > > > > > Sorry, I don't follow you. We tried to fork and failed, so return an > > > indication of such to the function that invoked startscript. Why is that > > > confusing. > > > > The comment is wrong. <=0 is not failure. <0 is failure, but ==0 is > > 'this is the child process'. > > > > Jules > > Ok, thank you. This confusion is cleaned up by redefining the member function > int fork(); > as > bool fork_child();
Or alternatively, changing the comment to: // Fork and/or execvp failed. Angus