perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jie Gao <J....@isu.usyd.edu.au>
Subject [OT] Re: mod_perl, pipes, and "No child processes"
Date Wed, 07 Nov 2001 00:12:44 GMT
On Tue, 6 Nov 2001, Tom Servo wrote:

> On Tue, 6 Nov 2001, Luciano Miguel Ferreira Rocha wrote:
>
> > >
> > > I was under the assumption that doing something similar to:
> > >
> > > my $returnval = $msg->send();
> > >
> > > Would give a similar answer.
> > >
> > > I'll give the $? a shot though.   I've noticed that from the shell, it
> > > always has a 0, and that would show up as false under perl...
> >
> > Well, on the shell and every other program, an exit status of 0 means
> > success, and a higher one means an error of some kind.
> >
> > Btw: /bin/false ; echo $? ==> 1
> >      /bin/true  ; echo $? ==> 0
> >
> > Also, the SIGCHLD is sent when a child exits, no matter if in error.
> > You should then check the $? for the reason of the exit and for the
> > return code, if exited normally.
> >
> > Regards,
> >   Luciano Rocha
> >
>
> I've done this now and am getting back a -1 in $?, despite the mail itself
> succeeding.   How can I check the reason for an error code on $? ?

Check the Camel book p134 "Global Special Variables" (2nd ed).

Regards,



Jie


Mime
View raw message