On 2009 Jan 21, at 21:13, Thomas DuBuisson wrote:
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7ffff7470b70) = -1 ENOTTY (Inappropriate ioctl for device)
This is just the test for buffering: terminal-like devices (TCGETS) are line buffered, others are block buffered.
select(4, [3], [], NULL, {0, 0}) = 0 (Timeout) select(4, [3], [], NULL, {134, 217727}
""" I'm too rusty on any sort of low level work to draw meaning out of this without work, but...
See that failed ioctl that seems to be completely ignored, right before hanging in our 'select' call? And see the select call that says 'wait 134 seconds'? If you wait it out you get:
The ioctl() is a red herring, as stated above. I think the real problem is that files in /proc are all simulated by the kernel, and the simulation probably doesn't work very well if they're opened non- blocking and select()ed on. -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH