You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Eero Pikat <ee...@barchart.com> on 1999/09/14 23:38:27 UTC

os-windows/5010: Detachment Error in CGI

>Number:         5010
>Category:       os-windows
>Synopsis:       Detachment Error in CGI
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Tue Sep 14 14:40:00 PDT 1999
>Last-Modified:
>Originator:     eero@barchart.com
>Organization:
apache
>Release:        1.3.9
>Environment:
Windows NT Server 4.0, Apache version 1.3.9 only (not in 1.3.6)
>Description:
By doing a detached process, a new error has appeared under Windows NT (may be under other Win32 platforms, but havn't checked). For example, a perl process that runs another process will NOT be able to capture that other process's output.
 
The server actually opens a new console window with the output on the server (the window disappears almost immediately). This is not the way previous version worked, nor the way UNIX versions worked.

-- Eero
>How-To-Repeat:
Example:
#!/usr/bin/perl
print "Content-type: text/plain\n\n";
$xxx = `ls`;
print "Line 1\n$xxx\nLine 2";

will produce:
Line 1
Line 2

The ls command (or 'dir' if you prefer) will be completely ignored. It will not produce a Server Error (500), nor will the server die, it just doesn't quite work.
>Fix:
Undo the DETACHED process "fix," or fix the fix.
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, you need]
[to include <ap...@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!     ]