chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
audit: smaller fixes to audit hookup
[elogind.git]
/
src
/
execute.h
diff --git
a/src/execute.h
b/src/execute.h
index 1ab6a24d9b2c9e2a460f50049f96ec5ac77746ae..4b3449e2652222179ecb47f42b638ccb6d473b21 100644
(file)
--- a/
src/execute.h
+++ b/
src/execute.h
@@
-45,6
+45,15
@@
struct CGroupBonding;
#define SIGNALS_CRASH_HANDLER SIGSEGV,SIGILL,SIGFPE,SIGBUS,SIGQUIT,SIGABRT
#define SIGNALS_IGNORE SIGKILL,SIGPIPE
#define SIGNALS_CRASH_HANDLER SIGSEGV,SIGILL,SIGFPE,SIGBUS,SIGQUIT,SIGABRT
#define SIGNALS_IGNORE SIGKILL,SIGPIPE
+typedef enum KillMode {
+ KILL_CONTROL_GROUP = 0,
+ KILL_PROCESS_GROUP,
+ KILL_PROCESS,
+ KILL_NONE,
+ _KILL_MODE_MAX,
+ _KILL_MODE_INVALID = -1
+} KillMode;
+
typedef enum ExecInput {
EXEC_INPUT_NULL,
EXEC_INPUT_TTY,
typedef enum ExecInput {
EXEC_INPUT_NULL,
EXEC_INPUT_TTY,
@@
-78,6
+87,7
@@
struct ExecCommand {
char *path;
char **argv;
ExecStatus exec_status;
char *path;
char **argv;
ExecStatus exec_status;
+ bool ignore;
LIST_FIELDS(ExecCommand, command); /* useful for chaining commands */
};
LIST_FIELDS(ExecCommand, command); /* useful for chaining commands */
};
@@
-103,7
+113,7
@@
struct ExecContext {
int syslog_priority;
char *syslog_identifier;
int syslog_priority;
char *syslog_identifier;
- bool syslog_
no
_prefix;
+ bool syslog_
level
_prefix;
char *tcpwrap_name;
char *tcpwrap_name;
@@
-142,7
+152,11
@@
struct ExecContext {
* /bin/mount it is run in the same process group as us so
* that the autofs logic detects that it belongs to us and we
* don't enter a trigger loop. */
* /bin/mount it is run in the same process group as us so
* that the autofs logic detects that it belongs to us and we
* don't enter a trigger loop. */
- bool no_setsid;
+ bool same_pgrp;
+
+ /* Not relevant for spawning processes, just for killing */
+ KillMode kill_mode;
+ int kill_signal;
};
typedef enum ExitStatus {
};
typedef enum ExitStatus {
@@
-196,6
+210,7
@@
int exec_spawn(ExecCommand *command,
char **environment,
bool apply_permissions,
bool apply_chroot,
char **environment,
bool apply_permissions,
bool apply_chroot,
+ bool apply_tty_stdin,
bool confirm_spawn,
struct CGroupBonding *cgroup_bondings,
pid_t *ret);
bool confirm_spawn,
struct CGroupBonding *cgroup_bondings,
pid_t *ret);