httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Welton <>
Subject httpd 1.3 mod_cgi argv[0]
Date Tue, 21 Jun 2005 16:24:49 GMT
[ Please CC replies to me - thankyou! ]

Hi, I've managed to tickle an obscure bug in Tcl's environment
introspection by launching a 'starpack' (self contained Tcl
executable+script) as a CGI. (*)

here is the relevant bit of strace:

4763  execve("/usr/lib/cgi-bin/protect.cgi", ["protect.cgi"], [/* 25
vars */]) = 0

My question is this: why doesn't argv[0] get the full path of the
file?  It's not like the CGI can't figure it out from the cwd and the
argv0 it does get.  The Tcl folks are wondering why Apache does things
this way, and I think it's a reasonable question.

David N. Welton

Apache, Linux, Tcl Consulting


View raw message