Identify process id:
ps aux | grep processname
(Optional) see the dead pseudo terminal slave it is writing to:
ls -l /proc/PROCESSID/fd/1
Identify your current pseudo terminal slave:
tty
Replace the obsolete pts the process currently is writing to, with your current one:
gdb -p PROCESSID
Following commands inside the gdb environment:
p close(1)
p open("/dev/pts/NUMBER", 1)
q
y
Explanations:
p - print result of gdb command
close(1) - close standard output
/dev/pts/NUMBER - terminal to write to
Source: http://stackoverflow.com/a/3834605
Kategorie(n): Linux