#include "utf8.h"
#include "util.h"
+#define service_spawn(...) service_spawn_internal(__func__, __VA_ARGS__)
+
static const UnitActiveState state_translation_table[_SERVICE_STATE_MAX] = {
[SERVICE_DEAD] = UNIT_INACTIVE,
[SERVICE_CONDITION] = UNIT_ACTIVATING,
return SERVICE(candidate);
}
-static int service_spawn(
+static int service_spawn_internal(
+ const char *caller,
Service *s,
ExecCommand *c,
usec_t timeout,
pid_t pid;
int r;
+ assert(caller);
assert(s);
assert(c);
assert(ret_pid);
+ log_unit_debug(UNIT(s), "Will spawn child (%s): %s", caller, c->path);
+
r = unit_prepare_exec(UNIT(s)); /* This realizes the cgroup, among other things */
if (r < 0)
return r;