multiwatch(1)

πŸ“¦
version 1.0.1 Β· 2 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ‘‘ multiwatch β€” the manual page (General Commands Manual) πŸ‘‘

okay bestie, sit down, grab a strawberry πŸ“, because today we're learning about multiwatch. It's a multiwatch(1) situation, it lives in the General Commands Manual, and it is genuinely iconic.


✨ NAME ✨

multiwatch β€” forks and watches multiple instances of a program in the same environment πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

multiwatch [options] -- <application> [app arguments]

multiwatch -v

multiwatch --help | -?

like. the whole vibe is: you give it options, then --, then your app and its args. periodt.


🌸 DESCRIPTION 🌸

multiwatch is used to fork and watch multiple FastCGI backends. That's the whole job. She forks, she watches, she supervises. main character energy fr fr πŸ‘‘


πŸ’– OPTIONS πŸ’–

  • -f, --forks=children β€” how many children to fork and watch. default is 1. one. just one. slay.
  • -r, --retry=retries β€” how many times you're allowed to retry forking a single child. default is 3.
  • -t, --timeout=msecs β€” the retry timeout in ms. here's the tea: if the child dies after the timeout, the retry counter gets reset. default is 10000 ms = 10 s.
  • -s, --signal=signame β€” the signal you send to the children to signal 'graceful' termination. your options are HUP, INT, QUIT, TERM, USR1, USR2, and the default is USR1.
  • -?, --help β€” general usage instructions 🫢
  • -v, --version β€” show version and exit. bye πŸ‘‹

🌈 SIGNAL HANDLING 🌈

okay this part is lowkey the plot twist so pay attention πŸ™ˆ

multiwatch will forward the signal USR2. and if it receives HUP, INT, QUIT, TERM or USR1, it will send the signal from --signal to the children. and if it receives another signal from that group, it will forward the signal again. yes, again. it's giving "I said what I said" πŸ’…

a signal of the group HUP, INT, QUIT, TERM and USR1 tells multiwatch to go into "shutdown" mode β€” so it won't restart children after receiving it. no take-backs. that's the whole point. πŸ›‘


⭐ EXAMPLE ⭐

spawn 2 rails instances on the same FastCGI socket (and supervise them, obviously):

spawn-fcgi -s /tmp/fastcgi-rails.sock -n -- /usr/bin/multiwatch
-f 2 /home/rails/public/dispatch.fcgi

ate. no crumbs. πŸ”₯


πŸ’œ SEE ALSO πŸ’œ

go read it, bestie, it's the sibling. iykyk.


πŸŽ€ AUTHOR πŸŽ€

Stefan Buehler <source@stbuehler.de>. thank you for your service, legend 🫑


and that's the whole page, babes πŸ’– it's from the General Commands Manual, it's multiwatch(1) in the source/version sense, and it's dated September 17, 2010. iconic date, iconic page, we love her. bye bestie, go fork something responsibly 🌸✨

πŸ“¦ where this page comes from