# HG changeset patch # User Rik # Date 1420307527 28800 # Node ID 65f4d9e1206c6c41fa80c32e6d6a327f4106c4a5 # Parent 4f615cd9a68d0e6a0c2517934570d81bf26e3ccb Don't check for input redirect in combination with --eval or script. isatty is not reentrant and doesn't always give correct results when there are multiple concurrent instances of octave such as with make -j4. * octave.cc (octave_process_command_line): Remove code using isatty to check for input redirection. diff -r 4f615cd9a68d -r 65f4d9e1206c libinterp/octave.cc --- a/libinterp/octave.cc Sat Jan 03 17:57:54 2015 +0100 +++ b/libinterp/octave.cc Sat Jan 03 09:52:07 2015 -0800 @@ -711,22 +711,6 @@ octave_print_terse_usage_and_exit (); } - bool redir_input = ! gnulib::isatty (fileno (stdin)); - - if (! code_to_eval.empty () && redir_input) - { - error ("--eval \"CODE\" and '< script' are mutually exclusive options"); - - octave_print_terse_usage_and_exit (); - } - - if (script_file && redir_input) - { - error ("script file and '< script' are mutually exclusive options"); - - octave_print_terse_usage_and_exit (); - } - } // EMBEDDED is declared int instead of bool because this function is