zsh-workers
 help / color / mirror / code / Atom feed
* zsh 3.0 pre3 dumps core when... And a ksh emulation mode problem
@ 1996-07-25  7:24 pmutsaer
  1996-07-25  9:23 ` Zefram
  0 siblings, 1 reply; 2+ messages in thread
From: pmutsaer @ 1996-07-25  7:24 UTC (permalink / raw)
  To: zsh-workers

Hello,

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
core.

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)


Regards,

-- 
Peter Mutsaers



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: zsh 3.0 pre3 dumps core when... And a ksh emulation mode problem
  1996-07-25  7:24 zsh 3.0 pre3 dumps core when... And a ksh emulation mode problem pmutsaer
@ 1996-07-25  9:23 ` Zefram
  0 siblings, 0 replies; 2+ messages in thread
From: Zefram @ 1996-07-25  9:23 UTC (permalink / raw)
  To: pmutsaer; +Cc: zsh-workers

>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.

That's now a known problem.  I've submitted a patch for it.  The quick
fix is simply to prevent fflush() being called from printjob() if
fout==NULL.

-zefram



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1996-07-25  9:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-07-25  7:24 zsh 3.0 pre3 dumps core when... And a ksh emulation mode problem pmutsaer
1996-07-25  9:23 ` Zefram

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).