aboutsummaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2005-07-05 07:28:52 +0000
committerCorinna Vinschen <corinna@vinschen.de>2005-07-05 07:28:52 +0000
commit4ae72e8c0eafa40c08b8e16c124fecf49148fee9 (patch)
tree6a8cc092ffe8fccc7671c80a4ce5ab69ea66fa0f /winsup
parent35e456b7f573af8970ccfdea37d160597a471aaa (diff)
downloadnewlib-4ae72e8c0eafa40c08b8e16c124fecf49148fee9.zip
newlib-4ae72e8c0eafa40c08b8e16c124fecf49148fee9.tar.gz
newlib-4ae72e8c0eafa40c08b8e16c124fecf49148fee9.tar.bz2
* fhandler_tape.cc (fhandler_dev_tape::close): Don't do "extra stuff"
when we know we're execing.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog12
-rw-r--r--winsup/cygwin/fhandler_tape.cc19
2 files changed, 21 insertions, 10 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 7a97b1f..43df989 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2005-07-05 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_tape.cc (fhandler_dev_tape::close): Don't do "extra stuff"
+ when we know we're execing.
+
2005-07-04 Christopher Faylor <cgf@timesys.com>
Change foo (void) to foo () for all c++ functions throughout.
@@ -32,7 +37,7 @@
2005-07-04 Christopher Faylor <cgf@timesys.com>
- * cygtls.h (_cygtls): Perform minor reformatting.
+ * cygtls.h (_cygtls): Perform minor reformatting.
* winsup.h (close_all_files): Reflect argument change.
* dtable.cc (close_all_files): Ditto.
@@ -45,8 +50,9 @@
* syscalls.cc (close_all_files): Take an argument denoting whether to
release closed files or not.
- * path.cc (symlink): Change argument names to reflect linux man page.
- (symlink_worker): Ditto. Also appropriately set ENOENT for empty strings.
+ * path.cc (symlink): Change argument names to reflect linux man page.
+ (symlink_worker): Ditto. Also appropriately set ENOENT for empty
+ strings.
2005-07-04 Pierre Humblet <pierre.humblet@ieee.org>
diff --git a/winsup/cygwin/fhandler_tape.cc b/winsup/cygwin/fhandler_tape.cc
index b251d70..d3fd3ee 100644
--- a/winsup/cygwin/fhandler_tape.cc
+++ b/winsup/cygwin/fhandler_tape.cc
@@ -1243,17 +1243,22 @@ fhandler_dev_tape::open (int flags, mode_t)
int
fhandler_dev_tape::close ()
{
- int ret, cret;
+ int ret = 0;
+ int cret = 0;
- lock (-1);
- ret = mt->drive (driveno ())->close (get_handle (), is_rewind_device ());
+ if (!hExeced)
+ {
+ lock (-1);
+ ret = mt->drive (driveno ())->close (get_handle (), is_rewind_device ());
+ if (ret)
+ __seterrno_from_win_error (ret);
+ cret = fhandler_dev_raw::close ();
+ unlock (0);
+ }
if (mt_evt)
CloseHandle (mt_evt);
CloseHandle (mt_mtx);
- if (ret)
- __seterrno_from_win_error (ret);
- cret = fhandler_dev_raw::close ();
- return unlock (ret ? -1 : cret);
+ return ret ? -1 : cret;
}
void