This is the mail archive of the
mailing list for the Cygwin project.
cygpath hangs from postinstall scripts when called like $(cygpath-S) but not otherwise
- From: Harold L Hunt II <huntharo at msu dot edu>
- To: cygwin-apps at cygwin dot com
- Cc: cygx <cygwin-xfree at cygwin dot com>
- Date: Thu, 02 Oct 2003 18:26:09 -0400
- Subject: cygpath hangs from postinstall scripts when called like $(cygpath-S) but not otherwise
This looks like a cygpath problem, but it has something to do with the
environment in which cygpath gets run from a postinstall script.
Whomever is interested, please look into it. Whomever is not
interested, please keep your grumpy flames to yourself.
To demonstrate this problem, please do the following
1) Save the attached file as /etc/postinstall/cygpath-hangs.sh.
2) Run setup.exe, select any mirror.
3) Choose 'keep' on the package selection page. Then, select a null
package (e.g. XFree86-base) and choose 'reinstall'. This will cause
postinstall scripts to be run, but it won't change your installed
package or force you to have to download a large package just to get
4) setup.exe will run cygpath-hangs.sh and, lo!, it will sit there (i.e.
hang) waiting for cygpath-hangs.sh to return.
5) Go look in /var/log/ for the most recent file following the pattern
setup.log.postinstall*. Open it.
6) You should see the following in the log file:
+ which which
+ cygpath -S
++ which which
++ cygpath -S
7) Run /etc/postinstall/cygpath-hangs.sh from a bash shell and observe
that it does not hang.
1) You can run 'which which' from a postinstall script without saving
its output to a variable.
2) You can run 'cygpath -S' (or any other flag combo) from a postinstall
script without saving its output to a variable.
3) You can run 'which which' from a postinstall script and save its
output to a variable (e.g. FOO=$(which which))
4) If you run 'cygpath -S' from a postinstall script and save its output
to a variable (e.g. BAR=$(cygpath -S)), then cygpath will fail to return
5) cygpath's failure to return causes bash to fail to return, which
causes setup.exe to wait forever for cygpath-hangs.sh to complete.
There, I have proven beyond a doubt that this has absolutely nothing to
do with Cygwin/XFree86 :)
I would appreciate any help in fixing this.
Thanks in advance,