How to stop a given process with the linux task spooler

Viewed 2706

I am not sure, whether this question relates to Linux in particular:

I use the tsp command to run small batchs of processes

tsp ./myScript.sh

which is then running

ID   State      Output               E-Level  Times(r/u/s)   Command [run=1/5]
1    running    /tmp/ts-out.woHIKK                           ./myScript.sh

but how can I kill this process? The only -K killing option with tsp seems to wipe the whole tsp server, it could be done using

ps -aux | grep myScript.sh | kill {}

But isn't there any tsp way to do it? It sounds to me like an obvious option.

1 Answers

You can use kill:

kill $(tsp -p 1)

where 1 is the job ID.

Related