The fdblock program
fdblock sets or unsets the O_NONBLOCK flag on a given file descriptor
(which makes reading or writing non-blocking or blocking), then executes
fdblock [ -n ] fd prog...
fdblock makes the file descriptor number fd blocking,
no matter what its previous state was. It then execs into prog
with its arguments.
- -n : non-blocking. Sets fd to non-blocking
mode instead of blocking mode. If used on stdin (0) or stdout (1), this
option will make a lot of command-line programs behave improperly, because
most simple command-line programs only support blocking stdin and stdout.
Make sure you know what you are doing.
- fdblock has no portable shell equivalent.