diff options
author | Warner Losh <imp@FreeBSD.org> | 2003-04-25 02:13:42 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2003-04-25 02:13:42 +0000 |
commit | 812f53a7b540db8460ad9740eb248a8c509ba372 (patch) | |
tree | 931f13bb17cb4f7664f40067bbb9602464cc1318 /sbin/devd | |
parent | 81cda3d9230f99e873daa973d79198df90c8f469 (diff) | |
download | src-test2-812f53a7b540db8460ad9740eb248a8c509ba372.tar.gz src-test2-812f53a7b540db8460ad9740eb248a8c509ba372.zip |
Notes
Diffstat (limited to 'sbin/devd')
-rw-r--r-- | sbin/devd/devd.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sbin/devd/devd.cc b/sbin/devd/devd.cc index d8bb43607f2d..c962f2f702dc 100644 --- a/sbin/devd/devd.cc +++ b/sbin/devd/devd.cc @@ -72,7 +72,7 @@ static const char detach = '-'; int Dflag; int dflag; -int nflag = 1; +int nflag; int romeo_must_die = 0; static void event_loop(void); @@ -696,7 +696,9 @@ event_loop(void) FD_SET(fd, &fds); rv = select(fd + 1, &fds, &fds, &fds, &tv); // No events -> we've processed all pending events - if (rv == 0) { + // == 2 is a kernel bug, but we hang if we don't + // make allowances for a while. + if (rv == 0 || rv == 2) { if (Dflag) fprintf(stderr, "Calling daemon\n"); daemon(0, 0); |