diff options
author | Christopher Faylor <me@cgf.cx> | 2002-09-19 03:30:20 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2002-09-19 03:30:20 +0000 |
commit | 5bf785a017482da9b87a141e91f91a07a4d433d0 (patch) | |
tree | e0be3c2626e648fa0aabb41d593c4abaef433316 /winsup/cygwin/fhandler_process.cc | |
parent | 57dfd574a784bd6dbf0bc7c67b28a8283dff6149 (diff) | |
download | cygnal-5bf785a017482da9b87a141e91f91a07a4d433d0.tar.gz cygnal-5bf785a017482da9b87a141e91f91a07a4d433d0.tar.bz2 cygnal-5bf785a017482da9b87a141e91f91a07a4d433d0.zip |
* cygthread.cc (cygthread::initialized): Avoid copying on fork or some threads
may not end up in the pool.
(cygthread::new): Avoid race when checking for initialized. Add debugging
code.
* fhandler.cc (fhandler_base::raw_read): Add case for ERROR_INVALID_HANDLE due
to Win95 directories.
(fhandler_base::open): Handle errors due to Win95 directories.
(fhandler_base::close): Add get_nohandle () test.
(fhandler_base::set_close_on_exec): Ditto.
(fhandler_base::fork_fixup): Ditto.
(fhandler_base::lock): Change error code to Posix EINVAL.
(fhandler_base::dup): If get_nohandle (), set new value to INVALID_HANDLE_VALUE
instead of NULL.
* fhandler_disk_file.cc (fhandler_disk_file::fstat): Call fstat_by_name if
get_nohandle (). Remove extraneous element from strpbrk.
(fhandler_disk_file::open): Remove test for Win95 directory.
* fhandler_random.cc (fhandler_dev_random::open): Add set_nohandle ().
* fhandler_clipboard.cc (fhandler_dev_clipboard::open): Ditto.
* fhandler_zero.cc (fhandler_dev_zero::open): Ditto.
(fhandler_dev_zero::close): Delete.
* fhandler.h (class fhandler_dev_zero): Ditto.
Diffstat (limited to 'winsup/cygwin/fhandler_process.cc')
-rw-r--r-- | winsup/cygwin/fhandler_process.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/winsup/cygwin/fhandler_process.cc b/winsup/cygwin/fhandler_process.cc index 6f59b2abd..23f0f9a5d 100644 --- a/winsup/cygwin/fhandler_process.cc +++ b/winsup/cygwin/fhandler_process.cc @@ -224,7 +224,7 @@ fhandler_process::open (path_conv *pc, int flags, mode_t mode) fileid = process_file_no; if (!fill_filebuf ()) - { + { res = 0; goto out; } @@ -458,8 +458,8 @@ format_process_stat (_pinfo *p, char *destbuf, size_t maxsize) utime = put.UserTime.QuadPart * HZ / 10000000ULL; stime = put.KernelTime.QuadPart * HZ / 10000000ULL; if (stodi.CurrentTime.QuadPart > put.CreateTime.QuadPart) - start_time = (spt.KernelTime.QuadPart + spt.UserTime.QuadPart - - stodi.CurrentTime.QuadPart + put.CreateTime.QuadPart) * HZ / 10000000ULL; + start_time = (spt.KernelTime.QuadPart + spt.UserTime.QuadPart - + stodi.CurrentTime.QuadPart + put.CreateTime.QuadPart) * HZ / 10000000ULL; else /* * sometimes stodi.CurrentTime is a bit behind @@ -590,7 +590,7 @@ off_t format_process_statm (_pinfo *p, char *destbuf, size_t maxsize) { unsigned long vmsize = 0UL, vmrss = 0UL, vmtext = 0UL, vmdata = 0UL, - vmlib = 0UL, vmshare = 0UL; + vmlib = 0UL, vmshare = 0UL; if (wincap.is_winnt ()) { if (!get_mem_values (p->dwProcessId, &vmsize, &vmrss, &vmtext, &vmdata, |