service-process.c revision 9ebd0c59de5f8240c0dbc58773fe5679391199db
549N/A#include "write-full.h"
549N/A#include "env-util.h"
549N/A#include "fd-close-on-exec.h"
549N/A#include "restrict-access.h"
549N/A#include "restrict-process-size.h"
549N/A#include "eacces-error.h"
549N/A#include "master-service.h"
549N/A#include "master-service-settings.h"
549N/A#include "dup2-array.h"
549N/A#include "service-anvil.h"
549N/A#include "service-log.h"
549N/A#include "service-process-notify.h"
549N/A#include "service-process.h"
549N/A case SERVICE_TYPE_LOG:
549N/A n += socket_listener_count;
549N/A case SERVICE_TYPE_ANVIL:
549N/A MASTER_LISTEN_FD_FIRST + n++);
549N/A MASTER_LISTEN_FD_FIRST + n++);
549N/A MASTER_LISTEN_FD_FIRST + n);
549N/A n++; socket_listener_count++;
549N/A ssl_socket_count = 0;
549N/A MASTER_LISTEN_FD_FIRST + n);
552N/A n++; socket_listener_count++;
549N/A case SERVICE_TYPE_LOG:
549N/A case SERVICE_TYPE_ANVIL:
549N/A case SERVICE_TYPE_CONFIG:
549N/A case SERVICE_TYPE_UNKNOWN:
549N/A case SERVICE_TYPE_LOGIN:
549N/A case SERVICE_TYPE_STARTUP:
closelog();
bool disallow_root;
unsigned int len;
case SERVICE_TYPE_CONFIG:
case SERVICE_TYPE_LOG:
static unsigned int uid_counter = 0;
bool process_forked;
return NULL;
return NULL;
if (pid < 0) {
return NULL;
if (pid == 0) {
if (process_forked) {
return process;
return TRUE;
return FALSE;
switch (status) {
case FATAL_LOGOPEN:
case FATAL_LOGWRITE:
case FATAL_LOGERROR:
case FATAL_OUTOFMEM:
case FATAL_EXEC:
case FATAL_DEFAULT:
return NULL;
#ifdef WCOREDUMP
if (core_dumps_disabled) {
#ifndef HAVE_PR_SET_DUMPABLE
const char *msg;
if (status == 0) {
const char *data;
int status)
T_BEGIN {
bool default_fatal;
} T_END;