I have detached a process from my terminal, like this:$ process &That terminal is now long closed, but process is still running and I want to send some commands to that process's stdin. Is that possible?
How to attach terminal to detached process?
linux;shell;command line;terminal;process
Yes, it is. First, create a pipe:mkfifo /tmp/fifo. Use gdb to attach to the process:gdb -p PIDThen close stdin: call close (0); and open it again: call open (/tmp/fifo, 0600)Finally, write away (from a different terminal, as gdb will probably hang):echo blah > /tmp/fifo