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

Bang completion kills zsh in emacs process buffer

I understand why the bug occurs, but it's been 4 or 5 years since I've
 been inside the zsh code and I'm unclear on the best way to correct the
 Here's the environment:
    Mac OS X 10.2.6
    emacs 21.3.50
 My emacs was built from CVS sources on 17 August, as the Mac OS X
 support not yet available in an official distribution. However, it looks
 like this could happen in any version of emacs running with native
 windows support.
 To reproduce:
    start emacs
    M-x shell     #if necessary M-x customize-variable
                          explicit-shell-file-name to zsh binary
    $ pwd
    $ echo !$     #zsh will now die
 In the debugger, zsh dies at hist.c:1092 trying to do a zputs(prt,shout)
 because the file pointer shout is null.
 As best I can tell, shout is normally initialized in init_shout, called
 from init_io at init.c:452. Walking through init_io, SHTTY never gets
 opened because the shell doesn't seem to be running in a tty (I would
 expect this to be true in any windowed emacs). So when it comes time to
 call init_shout, we conclude that since we're not using a tty, we're not
 going to need shout.
 I would appreciate it if someone who understood the logic behind
 interactive and non-interactive shells and the file pointers involved
 would take a look and tell me whether it's better to always set shout in
 init_io (either by direct assignment to stdout or dup) or test for
 shout==null in hist.c
 Dwight Shih 

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