On Fri, 2008-02-22 at 18:43 +0200, Eli Zaretskii wrote: > Maybe adding an option to make that explicitly sets line buffering for > stdout and stderr, and using that option in a cron job, would solve > your problem (assuming I'm guessing right).
stdout is already set explicitly to be line-buffered in GNU make (see main.c:main(), around line 1019). Personally I don't see any need for an option; if we want stderr to be line buffered as well then why not just set it that way by default? However, it sounds to me like the OP is seeing this issue even with output to stdout, which is already line-buffered (or is supposed to be). So, I think the issue might be more complex than that. The thing is, it's not a problem with make at all. Make just runs programs and waits for them to finish. The programs (compilers, etc.) that make invokes are printing directly to stdout/stderr, themselves; make is not reading that output and emitting it again. I'm pretty sure that line buffering settings are user-space features, not process features, and as such they are not inherited by sub-processes but rather determined anew for every process that starts, based on its terminal settings, etc. That means the problem is not make, but rather the programs you're running are not setting stdout to be line-buffered explicitly. I'm not sure there's much make can do about it, other than try to set up a pty or something and redirect all process output to that... ouch. Maybe you can run your cron job inside of screen or some other program that mimics a terminal, so the programs you invoke are set to use line buffering? -- ----------------------------------------------------------------------------- Paul D. Smith <[EMAIL PROTECTED]> http://make.mad-scientist.us "Please remain calm--I may be mad, but I am a professional."--Mad Scientist _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
