Thomas Bushnell BSG <[EMAIL PROTECTED]> writes: > But now there's a new, more subtle, one. Normal Debian automatic > build procedure is to build things with input redirected from > /dev/null.
Ok, I have found out (thanks to strace) where the rest of the output is going; it lands in "generate-documentation.log". This is incomprehensible; nothing can justify this! It's perfectly sensible to redirect the output to a log when *stdout* is unreachable, but not when *stdin* is. This led me to the likely source of the problem: the grotesque running-from-gui? function in scm/lily.scm. This function makes the wildly crazy assumption that if stdin is not a terminal, we must be running under a GUI. The code at the end of lily.scm overrides this when the --safe-mode switch has been given, but that doesn't affect the use of that flag again in lily-parser-scheme.cc, does it?! The actual problem is the following chdir, another random dependency on such irrelevant details as whether there is a gui or whether stdin is the function ly_parse_file, found in lily/lily-parser-scheme.cc. This function also uses that nice running-from-gui? flag, but unlike the code at the end of scm/lily.scm, it does not test to see whether the "safe" flag has been given. The result is that lily proceeds to *CHDIR* (for God's sake, why?!) into the directory of the scheme input file specified on the command line. And, because it has misguidedly chosen to write a log file (in the old directory), without even mentioning on stderr that stderr is being redirected, unasked for, it's pretty easy for poor little me to miss. The desire to write the output file in the same directory as the input, when running under a GUI, makes a teeny bit of sense, but chdir is totally the wrong way to do that, since it affects everything else a program might want to do. There is way too much grot associated with this for little-ol-me to fix for Debian; can you please fix it for me? It's really atrocious. At the very least, the code in lily.scm should be fixed to set the running-from-gui? flag on a sensible basis. Failing that, the --safe switch should be honored by lily-parser-scheme.cc. Regardless, the strategy chosen here seems quite ill-founded. Output should be written to stdout. Chdir shouldn't be done by programs like lilypond, ever. Whether stdin is a terminal is entirely irrelevant to the entire operation of the program. Thomas _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel