split: cleanup after posix_spawn

* boostrap.conf (gnulib_modules): Add posix_spawn_file_actions_destroy.
* src/split.c (cleanup): Call posix_spawnattr_destroy and
posix_spawn_file_actions_destroy after a successful posix_spawn.
This commit is contained in:
Collin Funk committed 2025-10-23 12:42:01 -07:00
1 parent ca8b928665
commit 2213542e40
2 files changed
+4

No files matched your search

+1
View File
@@ -220,6 +220,7 @@ gnulib_modules="
posix_spawnattr_setsigdefault
posix_spawn_file_actions_addclose
posix_spawn_file_actions_adddup2
posix_spawn_file_actions_destroy
posix_spawn_file_actions_init
posix_spawnp
posixtm
+3
View File
@@ -561,6 +561,9 @@ create (char const *name)
error (EXIT_FAILURE, errno, _("failed to run command: \"%s -c %s\""),
shell_prog, filter_command);
posix_spawnattr_destroy (&attr);
posix_spawn_file_actions_destroy (&actions);
if (close (fd_pair[0]) != 0)
error (EXIT_FAILURE, errno, _("failed to close input pipe"));
filter_pid = child_pid;