Can "DLL's" & libraries be marked as non-executable?

linda w cygwin@tlinx.org
Sun Jan 16 09:09:00 GMT 2005


I was told I might fix the problem of typing in a partial command name
like "cyg", and the command completion character and getting a long list
of DLL's with a few EXE's thrown in. 

I had been told it could be fixed through adjustment of the bash command
completion or in the readline completion used by bash.  This doesn't
appear to be a straight forward solution.  To complete a command, bash
relies on the default behavior in readline.  Readline relies on the
OS correctly returning a file's executable status as a command.  Readline
checks if what has been typed is a directory, a variable, a hostname or
a tilde needing expansion.  There doesn't seem to be a split out for
determining whether a file is an executable if the OS is "lying" to it.

I understand that DLL's are libraries of executable code much like linux
'so', shared object files, but the libraries on linux are not generally
considered to be executable commands even though they contain executable
code.

Is there some reason cygwin needs to return DLL's as executables, as the
underlying OS doesn't require it (having no 'executable bit').  Does some
part of cygwin need to mark DLL's as executables?  Can it be made a bit
smarter and know that DLL's contain executable code but are not intended
to be executable on their own.  If a user needs to execute a DLL, maybe
they could do so with cygstart, and let the native OS handle the start?
It would make command completion cleaner, I think.  The same could be
true of other libraries that are currently marked as executables (ocx, etc).

Wouldn't the following test for executable be sufficient: check
for the endings in PATHEXT, and peek in files for #! type
scripts. 

Perhaps it would cause problems, but it could be decided that only
extension-less files would be peeked at, inside -- thus speeding up
checks to see if a file is executable and maybe speeding up find's
in general (like when building the locate database).  Conversely,
it could skip peeking in the file if it had a known
library (non-executable) or PATHEXT extension (executable).  This might
be too big a step, but it would be nice to at least have the
libraries not considered to be executable commands unless
specifically called out via cygstart.

Is this something 'you', the cygwin maintainers might consider and
something that 'you' the cygwin users would welcome or accept?

Please don't blow me off by asking me to submit the patches. 
I am not capable of doing so at this point and may never be. :-(

Linda



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list