Date: Sun, 11 Sep 2016 18:58:44 +0000 (UTC) From: Baptiste Daroussin <bapt@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305707 - head/usr.sbin/syslogd Message-ID: <201609111858.u8BIwidO023845@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bapt Date: Sun Sep 11 18:58:44 2016 New Revision: 305707 URL: https://svnweb.freebsd.org/changeset/base/305707 Log: Directly set the O_NONBLOCK flags via open(2) Modified: head/usr.sbin/syslogd/syslogd.c Modified: head/usr.sbin/syslogd/syslogd.c ============================================================================== --- head/usr.sbin/syslogd/syslogd.c Sun Sep 11 18:56:38 2016 (r305706) +++ head/usr.sbin/syslogd/syslogd.c Sun Sep 11 18:58:44 2016 (r305707) @@ -621,10 +621,7 @@ main(int argc, char *argv[]) dprintf("sending on inet and/or inet6 socket\n"); } - if ((fklog = open(_PATH_KLOG, O_RDONLY, 0)) >= 0) - if (fcntl(fklog, F_SETFL, O_NONBLOCK) < 0) - fklog = -1; - if (fklog < 0) + if ((fklog = open(_PATH_KLOG, O_RDONLY|O_NONBLOCK, 0)) < 0) dprintf("can't open %s (%d)\n", _PATH_KLOG, errno); /* tuck my process id away */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201609111858.u8BIwidO023845>