1.1 --- a/libexec/lib/src/process_creating.cc Mon Dec 11 19:23:39 2023 +0100
1.2 +++ b/libexec/lib/src/process_creating.cc Tue Dec 12 01:46:46 2023 +0100
1.3 @@ -451,6 +451,10 @@
1.4
1.5 long err = _start(argc, argv, writer, process);
1.6
1.7 + /* Discard the writer since it will not be used in this task. */
1.8 +
1.9 + ipc_cap_free_um(writer);
1.10 +
1.11 /* Communicate the error using the signal value. */
1.12
1.13 if (err)
2.1 --- a/test_files/programs/dstest_exec_payload.c Mon Dec 11 19:23:39 2023 +0100
2.2 +++ b/test_files/programs/dstest_exec_payload.c Tue Dec 12 01:46:46 2023 +0100
2.3 @@ -52,6 +52,7 @@
2.4
2.5 client_write(output, "Terminating.\n", 13);
2.6 client_flush(output);
2.7 + client_close(output);
2.8 return 0;
2.9 }
2.10
3.1 --- a/tests/dstest_exec.cc Mon Dec 11 19:23:39 2023 +0100
3.2 +++ b/tests/dstest_exec.cc Tue Dec 12 01:46:46 2023 +0100
3.3 @@ -78,6 +78,10 @@
3.4
3.5 printf("Finished program initiation.\n");
3.6
3.7 + /* Release the writing end of the pipe. */
3.8 +
3.9 + client_close(writer);
3.10 +
3.11 /* Wait for a signal from the process or input from the process. */
3.12
3.13 err = notify_subscribe(process_notifiable(process), NOTIFY_TASK_ALL, notifier);
3.14 @@ -124,6 +128,7 @@
3.15 notify_values_t values = process_notification_values(process);
3.16
3.17 printf("End process (flags %" pFMTnotify_flags "x values: %ld, %ld)\n", flags, values.sig, values.val);
3.18 + printf("End reader (flags %" pFMTnotify_flags "x)\n", file_notifications(reader));
3.19
3.20 err = process_error(process);
3.21