From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27551 invoked from network); 19 Sep 2003 15:38:27 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 19 Sep 2003 15:38:27 -0000 Received: (qmail 7674 invoked by alias); 19 Sep 2003 15:38:22 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 19101 Received: (qmail 7664 invoked from network); 19 Sep 2003 15:38:22 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 19 Sep 2003 15:38:22 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [66.111.4.26] by sunsite.dk (MessageWall 1.0.8) with SMTP; 19 Sep 2003 15:38:21 -0000 Received: from smtp.us2.messagingengine.com (localhost [127.0.0.1]) by localhost.localdomain (Postfix) with ESMTP id 31B951EE341 for ; Fri, 19 Sep 2003 11:38:17 -0400 (EDT) Received: from 10.202.2.133 ([10.202.2.133] helo=smtp.us2.messagingengine.com) by messagingengine.com with SMTP; Fri, 19 Sep 2003 11:38:17 -0400 Received: by smtp.us2.messagingengine.com (Postfix, from userid 99) id 57F1878F31; Fri, 19 Sep 2003 11:38:19 -0400 (EDT) Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="ISO-8859-1" MIME-Version: 1.0 X-Mailer: MIME::Lite 1.2 (F2.71; T1.001; A1.51; B2.12; Q2.03) From: "Dwight Shih" To: zsh-workers@sunsite.dk Date: Fri, 19 Sep 2003 10:38:19 -0500 X-Epoch: 1063985897 X-Sasl-enc: KzvdgrP4FsVTd7ubCOYPPQ Subject: Bang completion kills zsh in emacs process buffer Message-Id: <20030919153819.57F1878F31@smtp.us2.messagingengine.com> 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 problem. =20 Here's the environment: =A0=A0 Mac OS X 10.2.6 =A0=A0 zsh-4.1.1 =A0=A0 emacs 21.3.50 =20 My emacs was built from CVS sources on 17 August, as the Mac OS X windows 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. =20 To reproduce: =A0=A0 start emacs =A0=A0 M-x shell=A0=A0=A0=A0 #if necessary M-x customize-variable =A0=A0 explicit-shell-file-name to zsh binary =A0=A0 $ pwd =A0=A0 $ echo !$=A0=A0=A0=A0 #zsh will now die =20 In the debugger, zsh dies at hist.c:1092 trying to do a zputs(prt,shout) because the file pointer shout is null. =20 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. =20 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=3D=3Dnull in hist.c =20 Thanks, =20 Dwight Shih=20