5 ms·
"Any userspace program which uses this new functionality must make sure that if it is used in early boot, that it will not cause the boot up scripts or other po
by acqq 12y ago
"Any userspace program which uses this new
functionality must make sure that if it is used in early boot, that it
will not cause the boot up scripts or other portions of the system
startup to hang indefinitely."
How can the userspace program "make sure that it doesn't hang indefinitely" if it is started early in the boot process and the call blocks?
- derekp7 12y agoIt can use the expect() system call and timeout / fail after a reasonable period of time if no bits are returned.
- justincormack 12y agoexpect() is not a system call.
- derekp7 12y agoSorry, I meant select(). Don't know where my head was when I typed that.
- nitrogen 12y agoCan you select() a system call (the new proposal) instead of an fd (the old interface)?
- lunixbochs 12y agoYou don't get a file handle to a syscall. You just load up some registers/stack and call a `SYSENTER`, `SYSCALL` or `INT 0x80` instruction. select is itself a separate syscall that takes in file handles or something.
- nitrogen 12y agoYeah, I know, but it wasn't clear if the parent comment was referring to select() on /dev/random, or the new syscall interface.
- lunixbochs 12y agoThere's a flag that determines whether it blocks or just returns an EAGAIN error. A program can use it in non-blocking-ish mode and try again later.