Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com From: "Hannu E K Nevalainen" To: Subject: RE: cygpath hangs from postinstall scripts when called like $(cygpath -S) but not otherwise Date: Mon, 6 Oct 2003 12:09:29 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal In-Reply-To: Importance: Normal X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 > From: Igor Pechtchanski > Sent: Monday, October 06, 2003 1:44 AM > It would be easy to check if the above was the reason for the hang by > trying to call the following program from a postinstall script and seeing > if it also hangs: It doesn't hang. :-I /Hannu E K Nevalainen, B.Sc. EE - 59?16.37'N, 17?12.60'E -- UTC+01, DST -> UTC+02 -- $ pwd /home/Hannu/tc $ for f in *.{c,sh} ;do echo --- $f ---;cat $f ;done --- tapp.c --- int hello(); int main() { printf("%d\n", hello()); printf("%d\n", hello()); } --- tdll.c --- #include static int counter = 0; int hello() { fprintf (stderr, ""); /* to pull in msvcrt.dll */ return counter++; } --- create_tap.sh --- #!/bin/bash -x gcc -mno-cygwin -shared -g -o tdll.dll tdll.c gcc -g -o tapp.exe tapp.c -L./ -ltdll if [ -r tapp.exe ] ; then cygcheck tapp.exe ./tapp.exe fi $ create_tap.sh + gcc -mno-cygwin -shared -g -o tdll.dll tdll.c + gcc -g -o tapp.exe tapp.c -L./ -ltdll + '[' -r tapp.exe ']' + cygcheck tapp.exe Found: .\tapp.exe tapp.exe C:\Program\cygwin\bin\cygwin1.dll F:\WINNT\system32\KERNEL32.dll F:\WINNT\system32\NTDLL.DLL .\tdll.dll F:\WINNT\system32\msvcrt.dll + ./tapp.exe 0 1 $ ls -l total 32 -rwxr-xr-x 1 Hannu 161 Oct 6 11:24 create_tap.sh* -rw-r--r-- 1 Hannu 91 Oct 6 11:23 tapp.c -rwxr-xr-x 1 Hannu 13623 Oct 6 11:42 tapp.exe* -rw-r--r-- 1 Hannu 138 Oct 6 11:07 tdll.c -rwxr-xr-x 1 Hannu 14652 Oct 6 11:42 tdll.dll* $ md5sum -b *.exe *.dll 9a9ea252c5dc91725f389f0c0c013165 *tapp.exe fd013cf1b8d03a4a0243eb75e44d8198 *tdll.dll $ cygstart /install/setup.exe & [1] 2316 $ tail /var/log/setup.log.full 2003/10/06 11:40:25 xinetd 2003/10/06 11:40:25 xmlto 2003/10/06 11:40:25 xpm-nox 2003/10/06 11:40:25 zip 2003/10/06 11:40:25 zsh 2003/10/06 11:40:25 running: C:\Program\cygwin\bin\sh.exe -c /etc/postinstall/tc.sh 0 1 2003/10/06 11:40:28 mbox note: Nothing needed to be installed 2003/10/06 11:40:29 Ending cygwin install [1]+ Done cygstart /install/setup.exe -- the cygpath hang once more, i.e. still there -- $ cygstart /install/setup.exe & [1] 2248 $ ps PID PPID PGID WINPID TTY UID STIME COMMAND 1636 1 1636 1080 con 500 11:06:44 /usr/bin/rxvt 1068 1636 1068 872 0 500 11:06:44 /usr/bin/bash 112 1 112 112 con 500 11:55:34 /usr/bin/sh I 2352 112 112 2352 con 500 11:55:34 /usr/bin/bash 2344 2352 112 2344 con 500 11:55:35 /usr/bin/cygpath 1252 1068 1252 2364 0 500 11:55:50 /usr/bin/ps [1]+ Done cygstart /install/setup.exe $ kill -9 2344 $ ps PID PPID PGID WINPID TTY UID STIME COMMAND 1636 1 1636 1080 con 500 11:06:44 /usr/bin/rxvt 1068 1636 1068 872 0 500 11:06:44 /usr/bin/bash 1292 1068 1292 2340 0 500 11:58:36 /usr/bin/ps $ tail /var/log/setup.log.full 2003/10/06 11:55:33 xpm-nox 2003/10/06 11:55:33 zip 2003/10/06 11:55:33 zsh 2003/10/06 11:55:34 running: C:\Program\cygwin\bin\sh.exe -c /etc/postinstall/t2.sh ++ cygpath -A -P + TOPFOLDER=/Cygwin-XFree86 + echo /Cygwin-XFree86 /Cygwin-XFree86 2003/10/06 11:56:15 mbox note: Nothing needed to be installed 2003/10/06 11:56:16 Ending cygwin install $ mv /etc/postinstall/t2.sh.done /etc/postinstall/t2.sh $ cat /etc/postinstall/t2.sh #!/bin/bash -x TOPFOLDER="`cygpath -A -P`/Cygwin-XFree86" echo $TOPFOLDER $ --END OF MESSAGE-- -- 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/