Reputation: 2257
How to get the PID of the processes started by the fabric run command. I want to keep track of the PID, in case I want to kill the process. Any better way of dealing with this case?
Upvotes: 5
Views: 1850
Reputation: 51
This should work because the shell opened by the run command is still open when the echo portion of the command is run:
run("mycommand & echo $!")
Upvotes: 5