This is the mail archive of the cygwin-apps 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]

Re: Upload: bash-3.0-4 [test]


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Corinna Vinschen on 7/6/2005 1:19 AM:
> Looks basically good to me and I was going to use it for the 00ash.sh
> script.  It just doesn't work on NTFS.  The reason is that, as soon as
> the hardlink has been created, the script will fail to run another time:
> 
> $ /bin/bash 00bash.sh
> $ /bin/bash 00bash.sh
> ln: cannot remove `/bin/sh.exe': Permission denied
> 
> Unfortunately, since the hardlink points to the same executable which
> is going to be replaced *and* is running the script, the OS refuses
> to unlink the executable.

As a last-ditch workaround, there is always exec (so that bash is no
longer running, and then the unlink can then succeed):

ln -f /bin/bash.exe /bin/sh.exe || exec ln -f /bin/bash.exe /bin/sh.exe

But this is fragile, so I have resorted to using cp.  Usually, the trade
is space for speed, so I imagine that the space savings of using a small
/bin/sh wrapper that execl()s bash would be offset by the speed penalty of
the extra execl.  Like you said,

> Who cares for 500K?

- --
Life is short - so eat dessert first!

Eric Blake             ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCzIlM84KuGfSFAYARAqMPAJ9C/kVp8Et5LbI+AUlJNhJiNn1ugwCgq/n0
TOrGzY/Pq5EOgUtknbVsSVM=
=XH/t
-----END PGP SIGNATURE-----


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