Add exec_background option in plugin command info and a sudoers

option to match.  When set, commands are started in the background
and automatically foregrounded as needed.  There are issues with
some ill-mannered programs (like Linux su) so this is not the
default.
This commit is contained in:
Todd C. Miller
2013-01-11 14:34:09 -05:00
parent a6f3517f23
commit 9479bb623b
13 changed files with 351 additions and 36 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1993-1996, 1998-2012 Todd C. Miller <Todd.Miller@courtesan.com>
* Copyright (c) 1993-1996, 1998-2013 Todd C. Miller <Todd.Miller@courtesan.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -526,7 +526,7 @@ done:
error_disable_setjmp();
rewind_perms();
/* Restore signal handlers before we exec. */
/* Restore signal handlers before we return. */
(void) sigaction(SIGINT, &saved_sa_int, NULL);
(void) sigaction(SIGQUIT, &saved_sa_quit, NULL);
(void) sigaction(SIGTSTP, &saved_sa_tstp, NULL);