httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoffrey <>
Subject Re: [users@httpd] Help running perl cgi over apache
Date Tue, 17 Feb 2004 12:49:22 GMT
Jonas Eckerman wrote:
> On Tue, 17 Feb 2004 11:21:09 -0000, michael watson (IAH-C) wrote:
>> print "Content-type: text/plain\n\n";
> Shouldn't that be \r\n\r\n on a Linux system?

No.  \r is a dos thing, it's a wasted character in the UNIX world.

>> system("/bin/sh /path/to/command &");
> I may be totally mistaken here, but my first thought is that the CGI
> might not be able to exit until that job is finished. If that is the
> case, you could try to have the script disown the job and see if that
> helps. Or maybe get the stuff to run completely separately from the
> script.

I'm not quite sure what you mean by disown, but running it in the 
background should permit the call to return.  As I noted in a previous 
post, it may have something to do with the explicit use of /bin/sh. 
That shouldn't be necessary as long as /path/to/command is executable.

>> The fact that a script run on the command line works, but the 
>> behaviour changes over cgi makes me think maybe I am doing
> OTH you're not running it the same way when you're running it from
> the command line. The owner of the job doesn't try to exit before the
> job is finished when you run it from a command line unless you're
> also logging out before it's finished.

By running it in the background, the process should release.

Until later, Geoffrey                     Registered Linux User #108567
Building secure systems inspite of Microsoft

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message