service.h revision db2cb23b5b179707000d28a11efb3d888d06ee80
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis This file is part of systemd.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis Copyright 2010 Lennart Poettering
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis systemd is free software; you can redistribute it and/or modify it
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis under the terms of the GNU Lesser General Public License as published by
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis the Free Software Foundation; either version 2.1 of the License, or
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis (at your option) any later version.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis systemd is distributed in the hope that it will be useful, but
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis WITHOUT ANY WARRANTY; without even the implied warranty of
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis Lesser General Public License for more details.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis You should have received a copy of the GNU Lesser General Public License
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis along with systemd; If not, see <http://www.gnu.org/licenses/>.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis SERVICE_EXITED, /* Nothing is running anymore, but RemainAfterExit is true hence this is OK */
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis SERVICE_STOP, /* No STOP_PRE state, instead just register multiple STOP executables */
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis SERVICE_STOP_SIGABRT, /* Watchdog timeout */
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis SERVICE_FINAL_SIGTERM, /* In case the STOP_POST executable hangs, we shoot that down, too */
typedef enum ServiceType {
SERVICE_ONESHOT, /* we fork and wait until the program finishes (i.e. programs like fsck which run and need to finish before we continue) */
} ServiceType;
typedef enum ServiceExecCommand {
typedef enum NotifyAccess {
} NotifyAccess;
typedef enum NotifyState {
} NotifyState;
typedef enum ServiceResult {
struct Service {
char *pid_file;
int socket_fd;
int bus_endpoint_fd;
bool permissions_start_only;
bool remain_after_exit;
bool guess_main_pid;
#ifdef HAVE_SYSV_COMPAT
int sysv_start_priority;
char *bus_name;
char *status_text;
int status_errno;
char *reboot_arg;
struct Socket;