service-process.c revision efc5c69c572e83db7bf7eab5d4698c0ab0d3d886
964N/A#include "write-full.h"
964N/A#include "env-util.h"
964N/A#include "fd-close-on-exec.h"
964N/A#include "restrict-access.h"
964N/A#include "restrict-process-size.h"
964N/A#include "eacces-error.h"
964N/A#include "master-service.h"
964N/A#include "master-service-settings.h"
964N/A#include "dup2-array.h"
964N/A#include "service-anvil.h"
964N/A#include "service-log.h"
964N/A#include "service-process-notify.h"
964N/A#include "service-process.h"
964N/A case SERVICE_TYPE_LOG:
964N/A n += socket_listener_count;
964N/A case SERVICE_TYPE_ANVIL:
964N/A MASTER_LISTEN_FD_FIRST + n++);
964N/A MASTER_LISTEN_FD_FIRST + n++);
964N/A MASTER_LISTEN_FD_FIRST + n);
964N/A n++; socket_listener_count++;
964N/A ssl_socket_count = 0;
964N/A MASTER_LISTEN_FD_FIRST + n);
964N/A n++; socket_listener_count++;
case SERVICE_TYPE_LOG:
case SERVICE_TYPE_ANVIL:
case SERVICE_TYPE_CONFIG:
case SERVICE_TYPE_UNKNOWN:
case SERVICE_TYPE_LOGIN:
closelog();
bool disallow_root;
unsigned int len;
env_clean();
env_put(*p);
case SERVICE_TYPE_CONFIG:
case SERVICE_TYPE_LOG:
static unsigned int uid_counter = 0;
bool process_forked;
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;