Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

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
share|improve this answer
    
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

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.:

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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