This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RFC: sh -c implied .exe suffix patch


The attached patch, loosely inspired by a Cygwin specific patch to cp,
solves the following problem:

    $ ls -ld foo*
    drwxr-xr-x    2 jt       Domain U        0 Jul 30 09:15 foo
    -rwxr-xr-x    1 jt       Domain U    17924 Jul 26 15:10 foo.exe

    $ sh -c ./foo
    ./foo: not found

Note that bash does not have this problem:

    $ bash -c ./foo
    hello

After studying the source for ash, bash, and cygwin.  I understand why
it works for bash but not for ash.  Unfortunately, AFAICT, this problem
cannot be solved in the Cygwin DLL.  So, I decided to develop a ash
workaround.  With this patch, ash now behaves like bash for the above
test case:

    $ sh -c ./foo
    hello

Is the ash maintainer willing to accept this patch?

Thanks,
Jason

Attachment: exec.c.diff
Description: Text document

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]