Trapit is a command line utility which traps short-lived processes
(e.g. curl
) with inspectors (e.g. strace
).
For example:
# In terminal A: the process holds off running until a signal is received
trapit exec -- curl https://httpbin.org/get
# In terminal B: the PID will be returned and the target process will wake up
strace -p "$(trapit wake)"