]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/core/swap.c
Merge pull request #9624 from poettering/service-state-flush
[thirdparty/systemd.git] / src / core / swap.c
index b61eab3e7e889a12fd17c3709e379b40c3aefa8c..000c028e77361ac8b7241f3f2df70c734b36cf54 100644 (file)
@@ -1,9 +1,4 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
-/***
-  This file is part of systemd.
-
-  Copyright 2010 Lennart Poettering
-***/
 
 #include <errno.h>
 #include <sys/epoll.h>
@@ -611,6 +606,7 @@ static int swap_spawn(Swap *s, ExecCommand *c, pid_t *_pid) {
                 .stdin_fd  = -1,
                 .stdout_fd = -1,
                 .stderr_fd = -1,
+                .exec_fd   = -1,
         };
         pid_t pid;
         int r;
@@ -858,6 +854,7 @@ static int swap_start(Unit *u) {
                 return r;
 
         s->result = SWAP_SUCCESS;
+        exec_command_reset_status_array(s->exec_command, _SWAP_EXEC_COMMAND_MAX);
 
         u->reset_accounting = true;