Subject: | ParseRecDescent unexpectedly dups STDERR at compile time |
Scenario:
My script attempts to detach from the user's terminal by closing STDIN,
STDOUT, and STDERR, doing a setsid() and forking.
Expected result:
The ssh connection is closed when the user logs out.
Actual result:
The connection hangs waiting for STDERR to be closed.
The problem comes from these statements:
open (ERROR, ">&STDERR");
open (TRACE, ">&STDERR");
open (TRACECONTEXT, ">&STDERR");
This module is unexpectedly dupping STDERR at module load time. This
was very hard to track down since Parse::RecDescent is a utility pulled
in from another library. This could be better encapsulated.