mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
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:
1 parent
ca8b928665
commit
2213542e40
2 files changed
+4
No files matched your search
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user