util: Set SIGPIPE to a no-op handler in virFork
Libvirtd has set SIGPIPE to ignored, and virFork resets all signal handlers to the defaults. But child process may write logs to stderr/stdout, that may generate SIGPIPE if journald has stopped. So set SIGPIPE to a dummy no-op handler before unmask signals in virFork(), and the handler will get reset to SIG_DFL when execve() runs. Now we can delete sigaction() call entirely in virExec(). Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Signed-off-by: NWang Yechao <wang.yechao255@zte.com.cn>
Showing
想要评论请 注册 或 登录