Author: fernando Date: Tue Jan 14 20:42:58 2014 New Revision: 2822 Log: sudo-1.8.9p3 - Bug 631 - sudo consumes full CPU while waiting on child process.
Added: trunk/sudo/sudo-1.8.9p3-remove_backchannel_event_if_EOF-1.patch Added: trunk/sudo/sudo-1.8.9p3-remove_backchannel_event_if_EOF-1.patch ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/sudo/sudo-1.8.9p3-remove_backchannel_event_if_EOF-1.patch Tue Jan 14 20:42:58 2014 (r2822) @@ -0,0 +1,30 @@ +Submitted By: Fernando de Oliveira <famobr at yahoo dot com dot br> +Date: 2014-01-15 +Initial Package Version: 1.8.9p3 +Upstream Status: Fixed +Origin: Upstream +URL:http://www.sudo.ws/bugs/show_bug.cgi?id=631 +Description: Sudo consumes full CPU while waiting on child process + +--- a/src/exec.c Tue Jan 14 09:26:14 2014 -0700 ++++ b/src/exec.c Tue Jan 14 10:54:56 2014 -0700 +@@ -230,11 +230,14 @@ + /* Short read or EOF. */ + sudo_debug_printf(SUDO_DEBUG_ERROR, + "failed to read child status: %s", n ? "short read" : "EOF"); +- /* +- * If not logging I/O we may get EOF when the command is +- * executed and sv is closed. It is safe to ignore this. +- */ +- if (ec->log_io || n != 0) { ++ if (!ec->log_io && n == 0) { ++ /* ++ * If not logging I/O we may get EOF when the command is ++ * executed and the other end of the backchannel is closed. ++ * Just remove the event in this case. ++ */ ++ (void)sudo_ev_del(ec->evbase, backchannel_event); ++ } else { + /* XXX - need new CMD_ type for monitor errors. */ + errno = n ? EIO : ECONNRESET; + ec->cstat->type = CMD_ERRNO; -- http://linuxfromscratch.org/mailman/listinfo/patches FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page