You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Randy Terbush <ra...@zyzzyva.com> on 1997/06/16 17:31:31 UTC

Re: exit(1); return(child_pid);

> Jim Jagielski wrote:
> > 
> > I'm still under the opinion that it's ugly though and never returns
> > a value at all under UNIX, no matter what happens. And under NT
> > it's already returned a value... In any case, these functions which
> > are called in spawn_child(_err) never return a value in UNIX and
> > must in NT, yet the code makes it appear that, at first glance,
> > it wants to return in both cases...
> > 
> 
> Ugggg... Ignore this. The easiest and simplest fix is to remove the
> exit(1) from the function and let spawn_child(_err) handle the exit
> call. Thus, if it returns, then the exec didn't succeed and we
> know that and spawn_child(_err) does the exit for us. I can't recall
> if it does a exit(0) or exit(1) but IMO it should be exit(1).
> 
> Sound reasonable?

Having looked at this, it does not appear that we use the returned 
value anyway. I think the return parameter in spawn_child(_err) needs to 
change to void.