execute.h revision 7491ccf2cb237a2a88b831b2c7374ba2bb255cba
f8e2fb7b14e53f5a4bcfd66d26910af1dee185c6Lennart Poettering/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
f8e2fb7b14e53f5a4bcfd66d26910af1dee185c6Lennart Poettering This file is part of systemd.
f8e2fb7b14e53f5a4bcfd66d26910af1dee185c6Lennart Poettering Copyright 2010 Lennart Poettering
f8e2fb7b14e53f5a4bcfd66d26910af1dee185c6Lennart Poettering systemd is free software; you can redistribute it and/or modify it
f8e2fb7b14e53f5a4bcfd66d26910af1dee185c6Lennart Poettering under the terms of the GNU Lesser General Public License as published by
f8e2fb7b14e53f5a4bcfd66d26910af1dee185c6Lennart Poettering the Free Software Foundation; either version 2.1 of the License, or
f8e2fb7b14e53f5a4bcfd66d26910af1dee185c6Lennart Poettering (at your option) any later version.
f8e2fb7b14e53f5a4bcfd66d26910af1dee185c6Lennart Poettering systemd is distributed in the hope that it will be useful, but
f8e2fb7b14e53f5a4bcfd66d26910af1dee185c6Lennart Poettering WITHOUT ANY WARRANTY; without even the implied warranty of
f8e2fb7b14e53f5a4bcfd66d26910af1dee185c6Lennart Poettering MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
f8e2fb7b14e53f5a4bcfd66d26910af1dee185c6Lennart Poettering Lesser General Public License for more details.
f8e2fb7b14e53f5a4bcfd66d26910af1dee185c6Lennart Poettering You should have received a copy of the GNU Lesser General Public License
f8e2fb7b14e53f5a4bcfd66d26910af1dee185c6Lennart Poettering along with systemd; If not, see <http://www.gnu.org/licenses/>.
f8e2fb7b14e53f5a4bcfd66d26910af1dee185c6Lennart Poettering int status; /* as in sigingo_t::si_status */
cc3773810855956bad92337cee8fa193584ab62eLennart Poettering LIST_FIELDS(ExecCommand, command); /* useful for chaining commands */
f8e2fb7b14e53f5a4bcfd66d26910af1dee185c6Lennart Poettering char *working_directory, *root_directory;
f8e2fb7b14e53f5a4bcfd66d26910af1dee185c6Lennart Poettering /* Since resolving these names might might involve socket
88231eb62cafc8bb51406919c8cf6019dc1ac916Thomas Hindoe Paaboel Andersen * connections and we don't want to deadlock ourselves these
88231eb62cafc8bb51406919c8cf6019dc1ac916Thomas Hindoe Paaboel Andersen * names are resolved on execution only and in the child
f8e2fb7b14e53f5a4bcfd66d26910af1dee185c6Lennart Poettering char **read_write_dirs, **read_only_dirs, **inaccessible_dirs;
de0671ee7fe465e108f62dcbbbe9366f81dd9e9aZbigniew Jędrzejewski-Szmek /* This is not exposed to the user but available
eecd1362f7f4de432483b5d77c56726c3621a83aLennart Poettering * internally. We need it to make sure that whenever we spawn
f8e2fb7b14e53f5a4bcfd66d26910af1dee185c6Lennart Poettering * /bin/mount it is run in the same process group as us so
f8e2fb7b14e53f5a4bcfd66d26910af1dee185c6Lennart Poettering * that the autofs logic detects that it belongs to us and we
f8e2fb7b14e53f5a4bcfd66d26910af1dee185c6Lennart Poettering * don't enter a trigger loop. */
cc3773810855956bad92337cee8fa193584ab62eLennart Poettering /* custom dbus enpoint */
eecd1362f7f4de432483b5d77c56726c3621a83aLennart Poetteringvoid exec_command_done_array(ExecCommand *c, unsigned n);
f8e2fb7b14e53f5a4bcfd66d26910af1dee185c6Lennart Poetteringvoid exec_command_free_list(ExecCommand *c);
f8e2fb7b14e53f5a4bcfd66d26910af1dee185c6Lennart Poetteringvoid exec_command_free_array(ExecCommand **c, unsigned n);
eecd1362f7f4de432483b5d77c56726c3621a83aLennart Poetteringvoid exec_command_dump(ExecCommand *c, FILE *f, const char *prefix);
a34faf579d2be139b0b9e8cd0c73ad4d918ef736Lukas Nykrynvoid exec_command_dump_list(ExecCommand *c, FILE *f, const char *prefix);
a34faf579d2be139b0b9e8cd0c73ad4d918ef736Lukas Nykrynvoid exec_command_append_list(ExecCommand **l, ExecCommand *e);
a34faf579d2be139b0b9e8cd0c73ad4d918ef736Lukas Nykrynint exec_command_set(ExecCommand *c, const char *path, ...);
cc3773810855956bad92337cee8fa193584ab62eLennart Poetteringint exec_command_append(ExecCommand *c, const char *path, ...);
a34faf579d2be139b0b9e8cd0c73ad4d918ef736Lukas Nykrynvoid exec_context_dump(ExecContext *c, FILE* f, const char *prefix);
cc3773810855956bad92337cee8fa193584ab62eLennart Poetteringint exec_context_destroy_runtime_directory(ExecContext *c, const char *runtime_root);
f8e2fb7b14e53f5a4bcfd66d26910af1dee185c6Lennart Poetteringint exec_context_load_environment(const ExecContext *c, const char *unit_id, char ***l);
527b7a421ff3927d4f3f170b1b143452e88ae1dcLennart Poetteringbool exec_context_may_touch_console(ExecContext *c);
527b7a421ff3927d4f3f170b1b143452e88ae1dcLennart Poetteringvoid exec_status_start(ExecStatus *s, pid_t pid);
f8e2fb7b14e53f5a4bcfd66d26910af1dee185c6Lennart Poetteringvoid exec_status_exit(ExecStatus *s, ExecContext *context, pid_t pid, int code, int status);
f8e2fb7b14e53f5a4bcfd66d26910af1dee185c6Lennart Poetteringvoid exec_status_dump(ExecStatus *s, FILE *f, const char *prefix);
f8e2fb7b14e53f5a4bcfd66d26910af1dee185c6Lennart Poetteringint exec_runtime_make(ExecRuntime **rt, ExecContext *c, const char *id);
f8e2fb7b14e53f5a4bcfd66d26910af1dee185c6Lennart PoetteringExecRuntime *exec_runtime_ref(ExecRuntime *r);
f8e2fb7b14e53f5a4bcfd66d26910af1dee185c6Lennart PoetteringExecRuntime *exec_runtime_unref(ExecRuntime *r);
527b7a421ff3927d4f3f170b1b143452e88ae1dcLennart Poetteringint exec_runtime_serialize(ExecRuntime *rt, Unit *u, FILE *f, FDSet *fds);
527b7a421ff3927d4f3f170b1b143452e88ae1dcLennart Poetteringint exec_runtime_deserialize_item(ExecRuntime **rt, Unit *u, const char *key, const char *value, FDSet *fds);
f8e2fb7b14e53f5a4bcfd66d26910af1dee185c6Lennart Poetteringvoid exec_runtime_destroy(ExecRuntime *rt);
f8e2fb7b14e53f5a4bcfd66d26910af1dee185c6Lennart Poetteringconst char* exec_output_to_string(ExecOutput i) _const_;
f8e2fb7b14e53f5a4bcfd66d26910af1dee185c6Lennart PoetteringExecOutput exec_output_from_string(const char *s) _pure_;
f8e2fb7b14e53f5a4bcfd66d26910af1dee185c6Lennart Poetteringconst char* exec_input_to_string(ExecInput i) _const_;