The following reply was made to PR bin/143017; it has been noted by GNATS.

From: Mark Johnston <mark...@gmail.com>
To: Ed Schouten <e...@80386.nl>
Cc: bug-follo...@freebsd.org, du...@smtp.ru
Subject: Re: bin/143017: watch(8): fatal: cannot attach to tty
Date: Mon, 12 Mar 2012 17:52:36 -0400

 On Mon, Mar 12, 2012 at 5:27 PM, Ed Schouten <e...@80386.nl> wrote:
 > Sure, but in that case you can simply use isatty() to distinguish the
 > special treatment. What I mean is that you can only call watch(8) by
 > passing the TTY used on the command line.
 
 Ok, fair enough. I replaced opt_interactive with isatty(std_out)
 checks. One check was unnecessary - the line with a FD_ISSET check. I
 also added a check in unset_tty() so that the terminal doesn't break
 if we bail with ^C.
 
 So the difference now is that in non-interactive mode, we're not
 interested in stdin, and the tty has to be passed on the command line.
 
 > Also I see you've simplified the code that dynamically scales the input
 > buffer size. Though I think that's a good idea, I do think we should
 > increase BUF_SIZE to something higher. Setting it to 4 KB or something
 > shouldn't harm, right?
 
 Yeah, good point. I've attached the regenerated patch.
 
 -Mark
_______________________________________________
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Reply via email to