SHA256
1
0
forked from pool/cpio
cpio/cpio-close_files_after_copy.patch

27 lines
417 B
Diff

Index: src/copyin.c
===================================================================
--- src/copyin.c.orig
+++ src/copyin.c
@@ -1484,7 +1484,20 @@ process_copy_in ()
fputc ('\n', stderr);
apply_delayed_set_stat ();
-
+
+ if (tty_in)
+ {
+ fclose(tty_in);
+ }
+ if (tty_out)
+ {
+ fclose(tty_out);
+ }
+ if (rename_in)
+ {
+ fclose(rename_in);
+ }
+
if (append_flag)
return;