From mboxrd@z Thu Jan 1 00:00:00 1970 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes Resent-Date: Sat, 30 Jan 1999 13:05:30 -0500 (EST) From: "Bart Schaefer" Message-Id: <990130100451.ZM12586@candle.brasslantern.com> Date: Sat, 30 Jan 1999 10:04:51 -0800 In-Reply-To: <9901301251.AA43826@ibmth.df.unipi.it> Comments: In reply to Peter Stephenson "Re: PATCH: (more) Re: PATCH: 3.1.5* & 3.0.5: Re: strange xterm & zsh behaviour" (Jan 30, 1:51pm) References: <9901301251.AA43826@ibmth.df.unipi.it> X-Mailer: Z-Mail (4.0b.820 20aug96) To: Drazen Kacar , zsh-workers@math.gatech.edu Subject: Re: PATCH: (more) Re: PATCH: 3.1.5* & 3.0.5: Re: strange xterm & zsh behaviour MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"hb5Rv2.0.iw.gdqis"@math> Resent-From: zsh-workers@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Resent-Sender: zsh-workers-request@math.gatech.edu X-Mailing-List: 5123 On Jan 30, 1:51pm, Peter Stephenson wrote: } Subject: Re: PATCH: (more) Re: PATCH: 3.1.5* & 3.0.5: Re: strange xterm & } } Peter Stephenson wrote: } > You mean something like the following? I don't quite know how to test } > for this, since you can't be assured fd 0 is /dev/tty. Maybe the } > ioctl() on its own is enough. } } sorrysorry... this time I've tested it. (I didn't realise I could on } AIX, but TIOCNXCL does exist after all.) This replaces the one two } minutes ago. Misc. remarks: (For Drazen) Is it desirable to ALWAYS do this? For a backgrounded shell, calling ioctl() on a tty device will usually result in a SIGTTOU stopping the process. (For PWS et al.) Even if it should always be done, I think it'd be a good idea to move this code down the point where an attempt to open /dev/tty might be made anyway, so that it needn't be opened and closed more than once. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com