diff options
author | Luca Boccassi <bluca@debian.org> | 2023-04-12 12:13:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-12 12:13:43 +0100 |
commit | 068943453f94c7e44a7b09972ae0cde09080aa95 (patch) | |
tree | 85fb54f25f7ca7f1e85152ddc9787c860d6f7335 /src | |
parent | e61ab091b72fe2a219087f39edc15097978bf921 (diff) | |
parent | 1412ad9a8136ce93a5e080a377f8432b7fc542b2 (diff) | |
download | systemd-068943453f94c7e44a7b09972ae0cde09080aa95.tar.gz |
Merge pull request #27165 from poettering/fdstore-envvar
service: tell service processes that the fdstore is available via an e…
Diffstat (limited to 'src')
-rw-r--r-- | src/core/service.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/service.c b/src/core/service.c index 48229f96ee..650741cc7c 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -1677,7 +1677,7 @@ static int service_spawn_internal( if (r < 0) return r; - our_env = new0(char*, 12); + our_env = new0(char*, 13); if (!our_env) return -ENOMEM; @@ -1686,6 +1686,10 @@ static int service_spawn_internal( return -ENOMEM; exec_params.notify_socket = UNIT(s)->manager->notify_socket; + + if (s->n_fd_store_max > 0) + if (asprintf(our_env + n_env++, "FDSTORE=%u", s->n_fd_store_max) < 0) + return -ENOMEM; } if (s->main_pid > 0) |