You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.3 KiB

From: roy at (Roy Smith)
Date: Wed, 14 Apr 1999 11:28:18 -0400
Subject: forking + stdout = confusion
References: <RUgQ2.31$> <> <> <ne2R2.33$>
Message-ID: <>
X-UID: 314
clarence at (Clarence Gardner) wrote:
> That does indeed do the trick, but you probably had to os.close(2) also.
> (Both stdout and stderr normally are piped into Apache.)
I don't know how all Apaches work, but at least on our machine, cgis get
pipes for stdin and stdout, but stderr is connected directly to the error
log file. I wrote a little test cgi which is just:
> #!/bin/sh
> sleep 300
opened and ran lsof, which is
a neat utility which mucks about in the kernel's file tables and shows you
what files a process has open. I got:
sleep 25247 nobody 0r FIFO 0x04a6ff00 0 22787
sleep 25247 nobody 1w FIFO 0x04096e00 0 22788
sleep 25247 nobody 2w VREG 3049,395040 4420204 90
Roy Smith <roy at>
New York University School of Medicine