Date: Sat, 22 Oct 2016 20:57:51 +0000 (UTC) From: Baptiste Daroussin <bapt@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r307796 - stable/11/usr.sbin/syslogd Message-ID: <201610222057.u9MKvpAm014620@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bapt Date: Sat Oct 22 20:57:51 2016 New Revision: 307796 URL: https://svnweb.freebsd.org/changeset/base/307796 Log: MFC r305707: Directly set the O_NONBLOCK flags via open(2) Modified: stable/11/usr.sbin/syslogd/syslogd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/syslogd/syslogd.c ============================================================================== --- stable/11/usr.sbin/syslogd/syslogd.c Sat Oct 22 20:56:49 2016 (r307795) +++ stable/11/usr.sbin/syslogd/syslogd.c Sat Oct 22 20:57:51 2016 (r307796) @@ -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?201610222057.u9MKvpAm014620>