SETBLOCK(1)

πŸ“¦ version 2024.12.07, in nixpkgs unstable

πŸ’… setblock(1) β€” the setblock program ✨

SYNOPSIS πŸ¦‹

setblock [{+|-}fd ...] [: command arg ...]

DESCRIPTION πŸ’–

okay so bestie, setblock is literally a tiny little fd vibe-flipper. It sets each given file descriptor to be blocking when you use +, or non-blocking when you use -. Then it execs the given command, if any. No cap.

A colon : is the separator between the file descriptors and the command. That's the whole divide, iykyk.

  • +fd β€” set that given file descriptor to be blocking ✨
  • -fd β€” set that given file descriptor to be non-blocking πŸ’…
  • : β€” separates the file descriptors from the command πŸŽ€
  • command arg ... β€” the command to exec after the fd setup, if any 🫢

For example, this command sets file descriptor 3 to be nonblocking and file descriptor 4 to be blocking:

setblock -3 +4
Heads up bestie: the example is literally doing fd 3 with - β†’ nonblocking, and fd 4 with + β†’ blocking. The vibes are opposite-sign, the facts are exact. 😭

source/version + date sign-off: the footer is just the program name again with empty () and everything, but no version and no date attached, so that's the entire page β€” periodt, bestie πŸ’–πŸŽ€

πŸ“¦ where this page comes from