www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Lauer <rla...@cji.com>
Subject general/6314: parent waits indefinetly for a forked child
Date Fri, 14 Jul 2000 15:02:25 GMT

>Number:         6314
>Category:       general
>Synopsis:       parent waits indefinetly for a forked child
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Fri Jul 14 08:10:02 PDT 2000
>Originator:     rlauer@cji.com
solaris 5.6
A CGI writes to stdout (perhaps a short HTML segment) closes stdout and forks a child.  The
parent then exits.  The child goes off and continues processing.  Apparently, Apache is waiting
for the child to exit before any output is actually sent to the browser.

Looks like apache is holding the socket open to the browser, despite the fact that both parent
and child have closed STDOUT.  Only when the child exits does the connection get released.

$| = 1;

print "Content-type: text/html\n\n<html><body><h1>test</h1></body></html>\n";
close STDOUT;
my $pid = fork();
if ($pid > 0) {
else {
  close STDOUT;

 [In order for any reply to be added to the PR database, you need]
 [to include <apbugs@Apache.Org> in the Cc line and make sure the]
 [subject line starts with the report component and number, with ]
 [or without any 'Re:' prefixes (such as "general/1098:" or      ]
 ["Re: general/1098:").  If the subject doesn't match this       ]
 [pattern, your message will be misfiled and ignored.  The       ]
 ["apbugs" address is not added to the Cc line of messages from  ]
 [the database automatically because of the potential for mail   ]
 [loops.  If you do not include this Cc, your reply may be ig-   ]
 [nored unless you are responding to an explicit request from a  ]
 [developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]

View raw message