Mailing List Archive

HP and cgi-script children
Anyone know if this is a bug in the HP version of httpd..

If I call a perl script from httpd, and it executes an
external command e.g. with system or ``, the status of
the called command comes back incorrect.

I suspect than the HP httpd is waiting on the exit signal of
the cgi child process, and taking it before the perl script
has a chance to catch it. The response I get is 65535 which
the wait man page says is caused by the parent finding the
child to have stopped already.

Anyone have ideas on that ?

It works fine via a Sunos httpd.

rob h
Re: HP and cgi-script children [ In reply to ]
>
> This is a known bug which I've seen mentioned on the Net a lot over
> the past few weeks, but which slipped my mind when I was putting
> together the bug list. For systems with SYSV signal handling (as
> opposed to BSD), the server needs to reset the signal handling on
> SIGCHLD to SIG_DFL (from SIG_IGN) before exec'ing the script.
>
> On HP-UX (but apparently *not* on, say, Solaris) it works to just
> compile the thing with -DBSD, or so I remember from the reports.

I remember seeing the posting too, but didn't take enough notice
at the time. The -DBSD didn't work :-(

I tried using just 'make', but then tried 'make hp', which
bring me to another bug-fix, if I say 'make hp' I lose all the
CFLAGS I set earlier in the makefile.

rob
Re: HP and cgi-script children [ In reply to ]
This is a known bug which I've seen mentioned on the Net a lot over
the past few weeks, but which slipped my mind when I was putting
together the bug list. For systems with SYSV signal handling (as
opposed to BSD), the server needs to reset the signal handling on
SIGCHLD to SIG_DFL (from SIG_IGN) before exec'ing the script.

On HP-UX (but apparently *not* on, say, Solaris) it works to just
compile the thing with -DBSD, or so I remember from the reports.

rst