From d584454c8231f5811136b1ab88defe6e5ca81923 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sun, 12 Sep 2004 03:47:57 +0000 Subject: * exceptions.cc: (ctrl_c_handler): Do nothing while a Cygwin subprocess is starting. * child_info.h (init_child_info): Remove pid argument from declaration. * cygheap.h (init_cygheap::pid): New element. * dcrt0.cc (dll_crt0_0): Eliminate handling of now-noexistent cygpid parameter in child_info struct. Set forkee to 'true' rather than cygpid since the pid value was never used. (dll_crt0_1): Ditto. (_dll_crt0): Ditto. * fork.cc (fork_child): Don't wait for sigthread. This is handled in the fork call now. (fork_parent): Remove obsolete pid argument from init_child_info call. Don't do anything special with cygpid when DEBUGGING. (fork): Delay all signals during fork. (fork_init): Don't do anything special when DEBUGGING. * pinfo.cc (set_myself): Remove pid parameter. Use new pid field in cygheap. (pinfo_init): Don't pass pid argument to set_myself. * sigproc.cc (sig_send): Wait for dwProcessId to be non-zero as well as sendsig. (init_child_info): Eliminate handling of pid. (wait_sig): Implement method to temporarily hold off sending signals. * sigproc.h (__SIGHOLD): New enum. (__SIGNOHOLD): Ditto. * spawn.cc (spawn_guts): Remove obsolete pid argument from init_child_info call. --- winsup/cygwin/fhandler.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'winsup/cygwin/fhandler.cc') diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc index 31d77d7e2..56627d673 100644 --- a/winsup/cygwin/fhandler.cc +++ b/winsup/cygwin/fhandler.cc @@ -484,10 +484,10 @@ fhandler_base::open_9x (int flags, mode_t mode) { /* If mode has no write bits set, we set the R/O attribute. */ if (!(mode & (S_IWUSR | S_IWGRP | S_IWOTH))) - file_attributes |= FILE_ATTRIBUTE_READONLY; + file_attributes |= FILE_ATTRIBUTE_READONLY; /* The file attributes are needed for later use in, e.g. fchmod. */ pc.file_attributes (file_attributes & FILE_ATTRIBUTE_VALID_SET_FLAGS); - } + } x = CreateFile (get_win32_name (), access, shared, &sa, creation_distribution, file_attributes, 0); @@ -818,7 +818,7 @@ fhandler_base::write (const void *ptr, size_t len) on any OS. */ /* Check there is enough space */ if (!SetEndOfFile (get_output_handle ())) - { + { __seterrno (); return -1; } @@ -837,7 +837,7 @@ fhandler_base::write (const void *ptr, size_t len) if (!ret || written < zeros_this_time) { if (!ret) - { + { __seterrno (); if (get_errno () == EPIPE) raise (SIGPIPE); -- cgit v1.2.3