Mail Archives: cygwin/2003/10/06/06:09:55
> 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 <stdio.h>
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
<click through all defaults and "install from local dir">
$ 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
<cygpath hang>
$ kill -9 2344
<setup finishes>
$ 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/
- Raw text -