Directly set the O_NONBLOCK flags via open(2)
This commit is contained in:
parent
2b3f6d6650
commit
fafe86ce27
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=305707
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user