On Jun 20, 2:42am, u...@stderr.spb.ru ("Valeriy E. Ushakov") wrote: -- Subject: Re: CVS commit: src/usr.sbin/syslogd
| On Tue, Jun 19, 2012 at 09:44:35 -0400, Christos Zoulas wrote: | | > Module Name: src | > Committed By: christos | > Date: Tue Jun 19 13:44:35 UTC 2012 | > | > Modified Files: | > src/usr.sbin/syslogd: syslogd.c | > | > Log Message: | > - fix writev1() to pre-decrement count. | > - always open ttys with O_NDELAY. | > | > | > To generate a diff of this commit: | > cvs rdiff -u -r1.110 -r1.111 src/usr.sbin/syslogd/syslogd.c | | Hmm... Why is this necessary: | | f->f_file = open(f->f_un.f_fname, | - O_WRONLY|O_APPEND|O_NDELAY, 0); | + O_WRONLY|O_APPEND|O_NDELAY|O_NONBLOCK, 0); | | given that O_NDELAY is a compat name for O_NONBLOCK (that is, modulo | whatever historic quirks O_NDELAY had that I totally forgot about, but | in our sys/fcntl.h it's just an alias). | | | Ditto here: | | - if ((f->f_file = open(p, O_WRONLY|O_APPEND, 0)) < 0) { | + if ((f->f_file = open(p, O_WRONLY|O_APPEND|O_NDELAY, 0)) < 0) { | | given that you still call fcntl afterwards. I shouldn't... I will remove it. christos