bash, dircolors, setsid and a stackdump
David Rothenberger
daveroth@acm.org
Thu Jan 22 19:25:00 GMT 2004
I've just encountered a very strange problem involving setsid, rxvt,
bash and dircolors. I'm using CVS from Thu Jan 22 07:18:16 PST
2004.
I have a simple script script.sh:
---begin script---
#!/bin/sh
echo foo
sleep 10
---end script---
I have uncommented the dircolors line in the default /etc/profile
and am using the default /etc/DIR_COLORS.
I start an rxvt window with "rxvt -e bash --login -i". From that
window, I execute "setsid bash script.sh" and get a stackdump from
sleep.exe.
---begin stackdump---
Exception: STATUS_ACCESS_VIOLATION at eip=6100256C
eax=616727A4 ebx=00000000 ecx=61670000 edx=435F534C esi=00000EC8 edi=00BE0000
ebp=0022DA88 esp=0022DA70 program=C:\cygwin\bin\sleep.exe
cs=001B ds=0023 es=0023 fs=003B gs=0000 ss=0023
Stack trace:
Frame Function Args
0022DA88 6100256C (61670000, 00000002, 0022DAA8, 00000000) /netrel/src/cygwin-20040122/winsup/cygwin/cygheap.cc:180
0022DAA8 610915CF (0A03001C, 0022EC9C, 0022E370, 0022E370) /netrel/src/cygwin-20040122/winsup/cygwin/syscalls.cc:104
0022EDB8 6108EFDE (0A04CFF0, 0A04C5C8, 0A04D138, 00000003) /netrel/src/cygwin-20040122/winsup/cygwin/spawn.cc:794
0022EDE8 6108FC36 (00000003, 0A04CFF0, 0A04C5C8, 0A04D138) /netrel/src/cygwin-20040122/winsup/cygwin/spawn.cc:975
0022EE08 6102729B (0A04CFF0, 0A04C5C8, 0A04D138, 61088DE7) /netrel/src/cygwin-20040122/winsup/cygwin/exec.cc:36
0022EEF8 610868F1 (0A04CFF0, 0A04C5C8, 0A04D138, 00000000) ??:0
0022EF48 00414735 (0A04CE48, 00000000, 0A045398, FFFFFFFF) ??:0
0022EFB8 004135B3 (0A04CD80, FFFFFFFF, FFFFFFFF, 00000000) ??:0
0022EFF8 004107BF (0A045380, 00000000, FFFFFFFF, FFFFFFFF) ??:0
0022F028 004101E4 (0A045380, 00000000, 004888F4, 0A041310) ??:0
0022F058 004039F9 (61672C1C, 00000002, 00000002, 00000001) ??:0
0022F0B0 00401783 (00000002, 61672C1C, 0A0411A8, 0022F108) ??:0
0022F0F0 61005EB5 (0022F108, 77D447A6, 00000000, 77D42EC8) /netrel/src/cygwin-20040122/winsup/cygwin/dcrt0.cc:901
0022FF90 61005FA0 (00000000, 00000000, 00000000, 00000000) /netrel/src/cygwin-20040122/winsup/cygwin/dcrt0.cc:945
End of stack trace
---end stackdump---
I do not encounter the problem if I
* run the command from a cmd.exe window either from within a "bash
--login -i" shell or directly from cmd.exe;
* comment out the dircolors line in /etc/profile; or
* invoke "setsid sh script.sh"
If I run "setsid bash script.sh" from an ash shell (running in a
cmd.exe window or rxvt) I don't get a stackdump, but the shell won't
accept another command until the script terminates.
Dave
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: script.sh
URL: <http://cygwin.com/pipermail/cygwin/attachments/20040122/3ba660f7/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: sleep.exe.stackdump
URL: <http://cygwin.com/pipermail/cygwin/attachments/20040122/3ba660f7/attachment-0001.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cygcheck.out
URL: <http://cygwin.com/pipermail/cygwin/attachments/20040122/3ba660f7/attachment-0002.ksh>
-------------- next part --------------
--
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/
More information about the Cygwin
mailing list