2010-03-26 00:54:27 +01:00
|
|
|
--- src/mt.c
|
2007-07-27 01:22:54 +02:00
|
|
|
+++ src/mt.c
|
2010-03-26 00:54:27 +01:00
|
|
|
@@ -694,9 +694,9 @@
|
|
|
|
|| (operation == MTDATCOMP)
|
2007-07-27 01:22:54 +02:00
|
|
|
#endif
|
2010-03-26 00:54:27 +01:00
|
|
|
)
|
|
|
|
- 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);
|
2007-07-27 01:22:54 +02:00
|
|
|
if (tapedesc == -1)
|
2010-03-26 00:54:27 +01:00
|
|
|
error (1, errno, _("%s: rmtopen failed"), tapedev);
|
|
|
|
check_type (tapedev, tapedesc);
|
|
|
|
--- src/util.c
|
2007-07-27 01:22:54 +02:00
|
|
|
+++ src/util.c
|
2010-03-26 00:54:27 +01:00
|
|
|
@@ -753,14 +753,14 @@
|
2007-07-27 01:22:54 +02:00
|
|
|
copy_in = process_copy_in;
|
|
|
|
|
|
|
|
if (copy_function == copy_in)
|
|
|
|
- fd = rmtopen (file, O_RDONLY | O_BINARY, MODE_RW, rsh_command_option);
|
|
|
|
+ fd = rmtopen (file, O_RDONLY | O_BINARY | O_NONBLOCK, MODE_RW, rsh_command_option);
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (!append_flag)
|
|
|
|
- fd = rmtopen (file, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, MODE_RW,
|
|
|
|
+ fd = rmtopen (file, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY | O_NONBLOCK, MODE_RW,
|
|
|
|
rsh_command_option);
|
|
|
|
else
|
|
|
|
- fd = rmtopen (file, O_RDWR | O_BINARY, MODE_RW, rsh_command_option);
|
|
|
|
+ fd = rmtopen (file, O_RDWR | O_BINARY | O_NONBLOCK, MODE_RW, rsh_command_option);
|
|
|
|
}
|
|
|
|
|
|
|
|
return fd;
|