Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

zsh 3.0 pre3 dumps core when... And a ksh emulation mode problem


zsh 3.0 on SunOS 4.1.4, compiled with gcc 2.7.2 (both with and without
optimization) dumps core when called wish a shell script as argument.

e.g. if file tst contains only the line 'ps', then
'zsh tst' causes a core dump.

Note that . tst, or simply 'tst' (implicitly calling zsh) do not dump

The report script also dumps core, so I cannot send a standard report.

Note that I use ksh emulation mode.

The stack trace (from gdb):

#0  0xef76f7b8 in fflush ()
#1  0x40a8c in printjob (jn=0xb3900, lng=0, synch=0) at jobs.c:343
#2  0x3fa68 in update_job (jn=0xb3900) at jobs.c:176
#3  0x59e18 in handler (sig=20) at signals.c:508
#4  <signal handler called>
#5  0xef76e898 in sigpause ()
#6  0x598ec in signal_suspend (sig=20, sig2=0) at signals.c:321
#7  0x413d8 in waitjob (job=1, sig=0) at jobs.c:510
#8  0x416b0 in waitjobs () at jobs.c:560
#9  0x1e860 in execpline (l=0xc13f8, how=2, last1=0) at exec.c:697
#10 0x1dfc4 in execlist (list=0xc1464, dont_change_job=0, exiting=0)
    at exec.c:522
#11 0x3ba04 in loop (toplevel=1) at init.c:129
#12 0x3b788 in main (argc=2, argv=0xeffff4d4) at init.c:77

I hope you can see something from this.

Another thing, concering ksh emulation mode:

On SunOS 4.1.4 ksh will call /bin/ksh on executable shell scripts
without #! on the first line. zsh will allways call /bin/sh.

This breaks some ksh scripts for me.

Is it possible to call /bin/ksh for such subshells instead of /bin/sh,
when in ksh emulation mode? (For now I simply modified /bin/sh in exec.c)


Peter Mutsaers

Messages sorted by: Reverse Date, Date, Thread, Author