Move warn/error into common and make static builds work.
This commit is contained in:
@@ -121,8 +121,8 @@ static void check_foreground(void);
|
||||
/*
|
||||
* Cleanup hook for error()/errorx()
|
||||
*/
|
||||
void
|
||||
cleanup(int gotsignal)
|
||||
static void
|
||||
pty_cleanup(void)
|
||||
{
|
||||
debug_decl(cleanup, SUDO_DEBUG_EXEC);
|
||||
|
||||
@@ -1294,6 +1294,9 @@ exec_pty(struct command_details *details, int *errfd)
|
||||
pid_t self = getpid();
|
||||
debug_decl(exec_pty, SUDO_DEBUG_EXEC);
|
||||
|
||||
/* Register cleanup function */
|
||||
error_callback_register(pty_cleanup);
|
||||
|
||||
/* Set command process group here too to avoid a race. */
|
||||
setpgid(0, self);
|
||||
|
||||
|
Reference in New Issue
Block a user