mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-25 01:02:24 +00:00
Conditionalise the calls to premsg and postmsg in uxcons.c's
logevent(), which temporarily turn off the raw mode we've put stderr into, so that they don't get called if the log_eventlog() call between them is not _actually_ going to write to stderr. Fixes a bug in which, if you define a Unix PuTTY saved session which uses 'plink -nc' as a local proxy command and then run PuTTY backgrounded from the shell with that session loaded, the subprocess Plink would get SIGTTOU when it tried to muck about with stderr and the whole thing would grind to a halt. I'm prepared to consider that acceptable if Plink _really_ wants to write on standard error, but if it doesn't, it should just carry on working in the background! [originally from svn r9462]
This commit is contained in:
parent
5c743effc0
commit
f030975da7
@ -321,10 +321,12 @@ void console_provide_logctx(void *logctx)
|
||||
void logevent(void *frontend, const char *string)
|
||||
{
|
||||
struct termios cf;
|
||||
premsg(&cf);
|
||||
if ((flags & FLAG_STDERR) && (flags & FLAG_VERBOSE))
|
||||
premsg(&cf);
|
||||
if (console_logctx)
|
||||
log_eventlog(console_logctx, string);
|
||||
postmsg(&cf);
|
||||
if ((flags & FLAG_STDERR) && (flags & FLAG_VERBOSE))
|
||||
postmsg(&cf);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user