httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <>
Subject Shell?
Date Tue, 08 Feb 2000 20:29:27 GMT
Question for you all,

I'm looking at the fixes required thru NT for the command shell... I found
out something very interesting about the CMD.EXE shell.  For details, skip
to the end first and skim [NT behavior observation]...

I am looking at shell exec and quoted path handling throughout Apache.  What
I'm asking of you all, is there a reason that the spawned processes, i.e.
piped log arguments etc... are proxied through execs of /bin/sh and not
directly invoked through the exec calls?

I don't see a reason, under Win32, to involve the overhead of spawning
CMD.EXE or COMMAND.COM in any situation, with the possible exception of
batch files.  I am wondering if it is not more effective to also internally
process shebang lines in Unix ourselves, with whatever other additional
processing might be required, rather than invoke the shell (memory and
thread overhead).

Just some thoughts.

[NT behavior observation]

The following command always works at the NT CMD.EXE prompt:

"c:\program files\apache\rotatelogs.exe" "c:\program files\apache\logs\test"

Logging output every 1 sec to <c:\progra~1\apache~1\apache\logs\test>

When stuffed through the CMD.EXE as the argument to /C, however, it fails

The name specified is not recognized as an
internal or external command, operable program or batch file.

So it seems a quoted program arg is invalid to the /C syntax, while
acceptable to the command line.  Makes little sense to me.

View raw message