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: Sun, 31 Jan 1999 20:24:32 -0500 (EST) From: "Bart Schaefer" Message-Id: <990131172405.ZM28213@candle.brasslantern.com> Date: Sun, 31 Jan 1999 17:24:05 -0800 In-Reply-To: <19990201015001.A11596@jagor.srce.hr> Comments: In reply to Drazen Kacar "Re: Terminal initialization and (non-)interactive shells" (Feb 1, 1:50am) References: <9901301251.AA43826@ibmth.df.unipi.it> <990130100451.ZM12586@candle.brasslantern.com> <19990130192746.A20234@jagor.srce.hr> <990130124135.ZM13173@candle.brasslantern.com> <19990201015001.A11596@jagor.srce.hr> X-Mailer: Z-Mail (4.0b.820 20aug96) To: zsh-workers@math.gatech.edu Subject: Re: Terminal initialization and (non-)interactive shells MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"P9v0x2.0.fO6.G9Gjs"@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: 5131 On Feb 1, 1:50am, Drazen Kacar wrote: } Subject: Re: Terminal initialization and (non-)interactive shells } } An ioctl(TIOCNXCL) call from background process succeeds in unlocking } the terminal device. Man page doesn't say a thing about this, but I think } it's safe to put it anywhere. I don't know about non-Solaris systems. By the time I sent my second message, I wasn't referring just to TIOCNXCL any more; it's the whole terminal setup block in init_io() that is a problem. } Besides, isatty(0) for background shell [checked with (echo foo >/dev/tty)& ] } doesn't return 1. I'm not sure how that let you check it, but strace on my linux system shows that isatty(0) most definitely does return 1. Note that I'm not talking about background subshells -- I'm talking about `/usr/local/bin/zsh &`. attachtty() most definitely gets stopped with at SIGTTOU in any background shell that happens to call it. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com