diff options
author | Jeff Epler <jepler@unpythonic.net> | 2014-02-27 07:48:47 -0600 |
---|---|---|
committer | Jeff Epler <jepler@unpythonic.net> | 2014-02-27 07:52:20 -0600 |
commit | 90984a0c26cb3ea354798051d8517c27c8ba195a (patch) | |
tree | 83befc00e38862eb83a6cdc4a8e045b26a5b989b | |
parent | 187b29a0bf24c8d63cca57971ca30059f3e97e9c (diff) | |
download | linuxcnc-90984a0c26cb3ea354798051d8517c27c8ba195a.tar.gz linuxcnc-90984a0c26cb3ea354798051d8517c27c8ba195a.zip |
interp: don't close log file if it's stderr
This fixes a problem that Dewey noted in private e-mail
where "puts stderr" logging was broken after loading an ngc file.
The combination of a change which used stderr as the interpreter's
default logging destination, and a change which caused interpreter objects
to be created and destroyed within a singla AXIS session led to this
problem.
-rw-r--r-- | src/emc/rs274ngc/rs274ngc_pre.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/emc/rs274ngc/rs274ngc_pre.cc b/src/emc/rs274ngc/rs274ngc_pre.cc index cd557944f..650149ee1 100644 --- a/src/emc/rs274ngc/rs274ngc_pre.cc +++ b/src/emc/rs274ngc/rs274ngc_pre.cc @@ -156,7 +156,8 @@ Interp::Interp() Interp::~Interp() { if(log_file) { - fclose(log_file); + if(log_file != stderr) + fclose(log_file); log_file = 0; } } |