Avoid blocking on Linux 2.6 with cpio 2.6. Probably should be guarded.
--- orig/src/mt.c
+++ mod/src/mt.c
@@ -742,9 +742,9 @@
|| (operation == MTDATCOMP)
#endif
)
- tapedesc = rmtopen (tapedev, O_WRONLY, 0, rsh_command_option);
+ tapedesc = rmtopen (tapedev, O_WRONLY | O_NONBLOCK, 0, rsh_command_option);
else
- tapedesc = rmtopen (tapedev, O_RDONLY, 0, rsh_command_option);
+ tapedesc = rmtopen (tapedev, O_RDONLY | O_NONBLOCK, 0, rsh_command_option);
if (tapedesc == -1)
error (1, errno, "%s", tapedev);
check_type (tapedev, tapedesc);
_______________________________________________
Bug-cpio mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-cpio