Bash: redirecting output from an already running process?

Possible duplicate:
Redirect STDERR / STDOUT of the process AFTER it starts using the command line?

Is there a way in Bash to capture / redirect the output (and stderr?) Of a process after it starts?

+5
source share
2 answers

Use of gdb is possible. The question has already been answered in this thread .

+7
source

No, at least not very reliable.

When a process forks, it has (at least) its first three file descriptors, ordered by the parent before fork (), so it inherits them.

fork, , , , .

, , . , (, gdb), . . , , , , .

+4

All Articles