You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "William A. Rowe, Jr." <wr...@rowe-clan.net> on 2000/11/16 15:59:38 UTC
Win32 Users please read: 1.3.15 win32 issue resolved?
> From: William A. Rowe, Jr. [mailto:wrowe@rowe-clan.net]
> Sent: Tuesday, November 14, 2000 5:21 PM
>
> Digging deeper... some script interpreters on win32 are expecting
> backslash-delimited paths ... I have a patch to correct this issue.
That patch is applied ... on to part 2 of the problem. First, for NT
users, a variety of this problem is easy to replicate on w2k or nt,
since /winnt/system32/command.com provides very straightforward
compatibility, simply set comspec and you are off to the races.
One problem is quoted long pathnames - some script interpreters will
not accept them. In fact, any interpreter pulled from the registry
that has a "%1" arg should recieve the long path, but any entry with
simply %1 should recieve the short path. This is a simple fix, I've
already coded the patch. The %1 and %* args from the registry are
now returned in the interpreter strings from ap_get_win32_interpreter
on Win32. The psuedocode looks like:
if !strstr(interpreter, "\"%1\"")
getshortpathname
if strstr(interpreter, "%1")
s/%1/shortpath/
else
append " " shortpath
else
s/%1/longpath/
Q: what do we do for shebang-invoked scripts? I would argue that we
use the shortpath, but allow a shebang format of #!executable "%1"
if they would rather get at a longpath.
[For anyone who is wondering (again) what the h@|| he's talking about,
since win32 accepts spaces in path/file names, the NT convention is to
quote the filepath, but this isn't consistently supported. Alternately,
the 8.3 dos filename formats are used for shortpath aliases. If you
don't use Win32, ignore the Q and be greatful you don't have this issue.]
Finally, the reason the Win9x command.com and many other cgi's don't
work is documented in mskb report Q150956, with a workaround. According
to the document, our app should work. Simple issue: file handles aren't
closed properly by 16-bit dos apps, or for some other very obscure
reason they mess up the pipe file so we end up with a terminally blocked
ReadFile after the app terminated. Since our app -doesn't- work, I'm
looking at the mechanics of -why- we don't, and how we can.
I expect to finish today so we can begin the process of rolling a tarball.
Win32 users, pease comment on the shebang line question above, and thanks,
everyone, for your patience.
Bill
RE: Win32 Users please read: 1.3.15 win32 issue resolved?
Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
> From: William A. Rowe, Jr. [mailto:wrowe@rowe-clan.net]
> Sent: Thursday, November 16, 2000 9:00 AM
>
> Finally, the reason the Win9x command.com and many other cgi's don't
> work is documented in mskb report Q150956, with a workaround. According
> to the document, our app should work. Simple issue: file handles aren't
> closed properly by 16-bit dos apps, or for some other very obscure
> reason they mess up the pipe file so we end up with a terminally blocked
> ReadFile after the app terminated. Since our app -doesn't- work, I'm
> looking at the mechanics of -why- we don't, and how we can.
We would have worked, except that we had freed our child processes' console.
This bug, in retrospect, made perfect sense. I'm working up a solution now.
The solution, of course, breaks the win9x services (go figure.) At least to
the user's perception, but it doesn't really :-)
Logoff scenario: The user is warned that the APACHE program must be stopped.
So it is. But - the child process is terminated (along with any CGIs it's
trying to run.) Once that process is terminated, the logoff is completed,
but a new Apache process is spawned. Not a bad behavior, just obnoxious
messages at the user, to which I'm suggesting ... who cares?
While I'm working this up, please think about and respond to my earlier
request for thoughts on shortpaths and shebang lines. Thanks,
Bill