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 15:42:21 -0500 (EST) From: "Bart Schaefer" Message-Id: <990130124135.ZM13173@candle.brasslantern.com> Date: Sat, 30 Jan 1999 12:41:35 -0800 In-Reply-To: <19990130192746.A20234@jagor.srce.hr> Comments: In reply to Drazen Kacar "Re: PATCH: (more) Re: PATCH: 3.1.5* & 3.0.5: Re: strange xterm & zsh behaviour" (Jan 30, 7:27pm) References: <9901301251.AA43826@ibmth.df.unipi.it> <990130100451.ZM12586@candle.brasslantern.com> <19990130192746.A20234@jagor.srce.hr> X-Mailer: Z-Mail (4.0b.820 20aug96) To: Drazen Kacar , zsh-workers@math.gatech.edu Subject: Terminal initialization and (non-)interactive shells MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"cJtZX.0.jZ1.jwsis"@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: 5126 On Jan 30, 7:27pm, Drazen Kacar wrote: } Subject: Re: PATCH: (more) Re: PATCH: 3.1.5* & 3.0.5: Re: strange xterm & } } Bart Schaefer wrote: } } > (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. } } Just for the first interactive shell on the terminal. Background shell } doesn't fall in that category. But why should a background shell attempt } to initialize the terminal? It seems to me that background shell shouldn't } call that function. On a related matter, does subshell initialize terminal? Every zsh, foreground or background, calls init_io(), which in turn does all the tty initialization if isatty(0). There's no test for `interactive'. This is, arguably, wrong. Another init_io(), but this time only for interactive shells, happens if/when "exec < /dev/foo" is run and foo is a tty device. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com