I'm looking at strace output that includes a call to the syscall poll():


(This is on a Debian system, I forget kernel version.)

I keep seeing calls that look like poll(NULL, 0, intrger_here). What happens when you call poll() with pollfd set to NULL like this? Why would a program be doing this?

(I suppose I should refer to kernel source.)

migrated from superuser.com Jan 14 at 9:17

This question came from our site for computer enthusiasts and power users.

    It is basically a longhand way of writing a sleep() of timeout duration.

    • Actually it's more a replacement for nanosleep(), but with millisecond resolution.– MurphyJan 15 at 13:43

    Your Answer


    By posting your answer, you agree to the privacy policy and terms of service.

    Not the answer you're looking for? Browse other questions tagged or ask your own question.