FDBLOCK(1)

πŸ“¦ version 2.9.9.2, in nixpkgs unstable

✨ NAME ✨

okay so bestie, fdblock is the icon that sets or unsets the O_NONBLOCK flag on a given file descriptor (which makes reading or writing non-blocking or blocking), then executes a program. this is the FDBLOCK(1) page from the General Commands Manual, and it’s lowkey a banger πŸ’…

🌸 SYNOPSIS 🌸

fdblock [-n] fd prog...

πŸ¦‹ DESCRIPTION πŸ¦‹

fdblock makes the file descriptor number fd blocking, no matter what its previous state was. It then execs into prog with its arguments. periodt.

bestie, fdblock has no portable shell equivalent β€” like, there is literally no portable shell equivalent, so don’t go looking for a cute one-liner replacement 😭

πŸ’– OPTIONS πŸ’–

  • -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. 😭
warn bestie ⚠️ that -n warning is not a drill: using it on stdin (0) or stdout (1) is exactly where things can get messy, because most simple command-line programs only support blocking stdin and stdout. Make sure you know what you are doing. πŸ’€

🌈 SEE ALSO 🌈

go give these besties some love: emptyenv(1), envfile(1), exec(1), execline-cd(1), execline-umask(1), exit(1), export(1), fdclose(1), fdmove(1), fdreserve(1), fdswap(1), getcwd(1), getpid(1), heredoc(1), piperw(1), posix-cd(1), posix-umask(1), redirfd(1), trap(1), tryexec(1), unexport(1), wait(1), withstdinas(1)

This man page is ported from the authoritative documentation at: https://skarnet.org/software/execline/fdblock.html

πŸ‘‘ AUTHORS πŸ‘‘

  • Laurent Bercot
  • Alexis <flexibeast@gmail.com> (man page port)

mwah πŸ’– source/version: Debian; date: February 14, 2021 β€” and that’s the FDBLOCK(1) tea, bestie. periodt. 🫢

πŸ“¦ where this page comes from