nickthecook/ops

Handle hanging dependency execution commands

nickthecook opened this issue · 0 comments

Sometimes a command meant to meet a dependency hangs, either because it's stuck or because it's asking for input. I need to CTRL+C after a while, but then I don't get to see the output, to figure out why it failed.

ops could:

  1. redirect input from /dev/null, so that any command that tried to read from stdin would error out, which would cause ops to print stdout and stderr.

  2. trap CTRL+C, print the command's stdout and stderr, and kill the command

The first one seems like it would be easier (because in the second, a signal handler has to find the pid of the command that is currently running). However, the first one would only help when a command hangs because it waits for input; it would not help with processes that get stuck for other reasons.

The first option should be implemented anyway, since there is no mechanism for feeding user input to commands that are meant to meet a dependency.