#sockets #subdirectory #manage #simultaneously #command #process #root-directory

yanked subsock

Run a command simultaneously in every subdirectory, and manage with a socket

0.1.0 Aug 14, 2019

#7 in #subdirectory

GPL-3.0+

8KB
154 lines

subsock

Run a command simultaneously in every subdirectory, and manage with a socket.

Usage: target/debug/subsock [options] PROGRAM [root_dir]

Options:
    -s, --socket NAME   set the socket path. [default: subsocket]
    -S, --no-socket     do not create a socket
    -h, --help          get help

PROGRAM will be run in parallel in every subdirectory (SUB), as SUB's owner.
A placeholder '{}' is available to PROGRAM, it will be replaced with SUB.
A socket will be created.
Sending the socket a message like 'restart SUB' will restart that SUB's process.

keep your subs happy

Dependencies

~2.3–3.5MB
~56K SLoC