2

I forgot to use screen and I have a task that has been running for quite some time, and I do not want to lose the saved data. Basically Ctrlc will end the task and save the data if I am on the same terminal session, is there a way to stop it in different SSH window?

I do not have access to the same terminal window at the moment.

8

C-c sends SIGINT to the foreground process group, you can kill it using kill on the foreground process group id (see ps -ej output).

kill -s INT -- -pgid
  • thanks i will remember this next time, I just tried to ssh in and the system rebooted so I lost the data :| – andyADD Apr 5 '13 at 2:50
2

There are several utilities that are able to change the tty of a running process. Most of them written exactly for the purpose of attaching a running process into a terminal multiplexer - see e.g.:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.