3

I'm using strace to investigate the select system call of a process and I'm trying to figure out what does left mean. Find below the debug line extracted from the strace log.

select(13, [6 7 8 11 12], [], NULL, {0, 10000}) = 1 (in [11], **left** {0, 9994})

So far, I didn't find anything in the available documentation.

Alexandru Rusu
  • 569
  • 1
  • 5
  • 21

1 Answers1

7

Note that select updates the timeout parameter to indicate the amount of time that was left before the timeout. This indicates that updated value, in usual struct timeval format (seconds and microseconds). See the strace source code to confirm this.

So in this case, fd 11 became ready for reading when only 6 microseconds had elapsed.

Nate Eldredge
  • 48,811
  • 6
  • 54
  • 82