httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <>
Subject RE: PR6880 CGI applications always fail (Windows)
Date Fri, 15 Dec 2000 13:53:11 GMT

Why add the cpu overhead?  If it's a quoted path, we know very
well the app accepts long path names - it stays quoted, and we
need no extra kernel call.

FirstBill's already all over my case over a cpu hit I consider
reasonably necessary (though optimizations are greatly needed.)
This one would be a joke.

On your other assertions, dir /x is documented in dir /?, and
there is not absolutely a short name (that's configurable).


> -----Original Message-----
> From: []
> Sent: Friday, December 15, 2000 2:13 AM
> To:
> Subject: Re: PR6880 CGI applications always fail (Windows)
> William...
> Regarding all this 'quote mark' stuff when launching Win32 CGI
> or checking #! some\script\runner SHEBANG interpreter
> names...
> Why not just use the following Win32 API call...
> GetShortPathName(
> r->filename,
> shortname_buffer,
> sizeof( shortname_buffer )
> );
> and/or
> GetShortPathName(
> shebang_interpreter_name,
> shortname_buffer,
> sizeof( shortname_buffer )
> );
> Then just ALWAYS use the 'short name' in the actual
> CGI call or Interpreter check/run
> It should work fine at all times and eliminate a whole lot
> of worrying about quote marks and spaces in names.
> The real magic is that even if you launch a CGI interpreter
> SHEBANG command line using the 'short' name... the
> actual executable will still only see it's own 'long' name
> when it looks at argv[0] or the WinMain command line parms.
> Whenever a file is saved on an NT system the OS creates and
> stores BOTH the 'long' name and a pre-generated 8.3 short name.
> There are no 'lookups' at access time... the name is sitting right
> there in the inode ready to be 'read'. The lower level file I/O calls 
> are already 'retrieving' both names at once, anyway, so there is no 
> performance hit. It's already happening no matter what.
> You can prove this using the secret 'dir /x' command at 
> a console prompt. This special Win32 directory command
> shows BOTH the 'long' and 'short' names for the file that
> are stored out in the 'inode'.

View raw message