Mantis - Resin
|
|||||
Viewing Issue Advanced Details | |||||
|
|||||
ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
400 | minor | always | 09-25-05 00:00 | 01-17-06 10:45 | |
|
|||||
Reporter: | user402 | Platform: | |||
Assigned To: | OS: | ||||
Priority: | normal | OS Version: | |||
Status: | closed | Product Version: | 3.0.14 | ||
Product Build: | 3.0.14 | Resolution: | fixed | ||
Projection: | none | ||||
ETA: | none | Fixed in Version: | 3.0.18 | ||
|
|||||
Summary: | 0000400: wrapper.pl stderr going into limbo | ||||
Description: |
RSN-446 The resin wrapper.pl script has a small bug in it: It closes STDOUT and STDERR and reopens them to the chosen jvm-log file, but it actually reopens STDIN and STDOUT leaving STDERR in limbo. The effect is that the JVM's STDERR (where System.err goes) gets redirected somewhere useless. You can check this by entering the following command: ls -l /proc/nnnn/fd where "nnnn" is the process-id number of one of the resin java processes (threads) and observing that file descriptors 0 and 1 (STDIN and STDOUT) both point to jvm.log and file descriptor 2 (STDERR) points to some weird place. Correcting this bug *may* result in a few more diagnostics ending up in the log files! Here is a diff (from Adrian Pronk) with changes: *** wrapper.pl.in Wed May 18 06:18:25 2005 --- wrapper.pl Sun Sep 4 14:44:06 2005 *************** *** 714,721 **** --- 714,724 ---- close(STDOUT); close(STDERR); + my $haveStdin = defined(fileno(STDIN)); + open(STDIN, "</dev/null") unless $haveStdin; open(STDOUT, ">>$jvm_log"); open(STDERR, ">&STDOUT"); + close STDIN unless $haveStdin; exec("$JAVA_EXE $JAVA_ARGS $class -socketwait $port $conf $RESIN_ARGS"); print(STDERR "Can't start java: $JAVA_EXE $JAVA_ARGS $class $conf $RESIN_ARGS"); |
||||
Steps To Reproduce: | |||||
Additional Information: | Debian Sarge | ||||
Relationships | |||||
Attached Files: |
There are no notes attached to this issue. |