summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/nxt_process.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/nxt_process.c b/src/nxt_process.c
index 638765a4..d83eed28 100644
--- a/src/nxt_process.c
+++ b/src/nxt_process.c
@@ -166,6 +166,14 @@ nxt_process_create(nxt_task_t *task, nxt_process_t *process)
init->name, nxt_errno);
#endif
+ if (nxt_slow_path(close(pipefd[0]) != 0)) {
+ nxt_alert(task, "failed to close pipe: %E", nxt_errno);
+ }
+
+ if (nxt_slow_path(close(pipefd[1]) != 0)) {
+ nxt_alert(task, "failed to close pipe: %E", nxt_errno);
+ }
+
return pid;
}
@@ -230,6 +238,10 @@ nxt_process_create(nxt_task_t *task, nxt_process_t *process)
goto fail_cleanup;
}
+ if (nxt_slow_path(close(pipefd[1]) != 0)) {
+ nxt_alert(task, "failed to close pipe: %E", nxt_errno);
+ }
+
process->pid = pid;
nxt_runtime_process_add(task, process);