io-util: fix ppoll_usec() bypass
If a non-zero timeout is specified we should not bypass ppoll() even if no fds are specified, since it will still act as a time based sleep in that case.
This commit is contained in:
+1
-1
@@ -208,7 +208,7 @@ int ppoll_usec_full(struct pollfd *fds, size_t nfds, usec_t timeout, const sigse
|
||||
* to handle signals, such as signalfd() or signal handlers. ⚠️ ⚠️ ⚠️
|
||||
*/
|
||||
|
||||
if (nfds == 0)
|
||||
if (nfds == 0 && timeout == 0)
|
||||
return 0;
|
||||
|
||||
r = ppoll(fds, nfds, timeout == USEC_INFINITY ? NULL : TIMESPEC_STORE(timeout), ss);
|
||||
|
||||
Reference in New Issue
Block a user