whitespace cleanup
This commit is contained in:
parent
00caa48b91
commit
46f5dd5958
@ -61,7 +61,7 @@ _cygtls::call2 (DWORD (*func) (void *, void *), void *arg, void *buf)
|
|||||||
|
|
||||||
/* Optional BLODA detection. The idea is that the function address is
|
/* Optional BLODA detection. The idea is that the function address is
|
||||||
supposed to be within Cygwin itself. This is also true for pthreads,
|
supposed to be within Cygwin itself. This is also true for pthreads,
|
||||||
since pthreads are always calling thread_wrapper in miscfuncs.cc.
|
since pthreads are always calling thread_wrapper in miscfuncs.cc.
|
||||||
Therefore, every function call to a function outside of the Cygwin DLL
|
Therefore, every function call to a function outside of the Cygwin DLL
|
||||||
is potentially a thread injected into the Cygwin process by some BLODA.
|
is potentially a thread injected into the Cygwin process by some BLODA.
|
||||||
|
|
||||||
|
@ -132,10 +132,10 @@ dll::init ()
|
|||||||
following fix: Check if the path is preceeded by a long pathname prefix,
|
following fix: Check if the path is preceeded by a long pathname prefix,
|
||||||
and, if so, drop it forthwith so that subsequent full path comparisons
|
and, if so, drop it forthwith so that subsequent full path comparisons
|
||||||
work as expected.
|
work as expected.
|
||||||
|
|
||||||
At least that was the original idea. In fact there are two case, linked
|
At least that was the original idea. In fact there are two case, linked
|
||||||
and runtime loaded DLLs, which have to be distinguished:
|
and runtime loaded DLLs, which have to be distinguished:
|
||||||
|
|
||||||
- Linked DLLs are loaded by only specifying the basename of the DLL and
|
- Linked DLLs are loaded by only specifying the basename of the DLL and
|
||||||
searching it using the system DLL search order as given in the
|
searching it using the system DLL search order as given in the
|
||||||
aforementioned MSDN URL.
|
aforementioned MSDN URL.
|
||||||
|
@ -1222,7 +1222,7 @@ fhandler_base_overlapped::close ()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Cancelling seems to be necessary for cases where a reader is
|
/* Cancelling seems to be necessary for cases where a reader is
|
||||||
still executing when a signal handler performs a close. */
|
still executing when a signal handler performs a close. */
|
||||||
if (!writer)
|
if (!writer)
|
||||||
CancelIo (get_io_handle ());
|
CancelIo (get_io_handle ());
|
||||||
destroy_overlapped ();
|
destroy_overlapped ();
|
||||||
|
@ -183,7 +183,7 @@ class fhandler_base
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
long inc_refcnt () {return InterlockedIncrement (&_refcnt);}
|
long inc_refcnt () {return InterlockedIncrement (&_refcnt);}
|
||||||
long dec_refcnt () {return InterlockedDecrement (&_refcnt);}
|
long dec_refcnt () {return InterlockedDecrement (&_refcnt);}
|
||||||
class fhandler_base *archetype;
|
class fhandler_base *archetype;
|
||||||
int usecount;
|
int usecount;
|
||||||
|
|
||||||
|
@ -591,7 +591,7 @@ fhandler_console::read (void *pv, size_t& buflen)
|
|||||||
|
|
||||||
if (dev_state.ext_mouse_mode6 /* distinguish release */
|
if (dev_state.ext_mouse_mode6 /* distinguish release */
|
||||||
&& mouse_event.dwButtonState < dev_state.dwLastButtonState)
|
&& mouse_event.dwButtonState < dev_state.dwLastButtonState)
|
||||||
mode6_term = 'm';
|
mode6_term = 'm';
|
||||||
|
|
||||||
dev_state.last_button_code = b;
|
dev_state.last_button_code = b;
|
||||||
|
|
||||||
@ -646,7 +646,7 @@ fhandler_console::read (void *pv, size_t& buflen)
|
|||||||
|
|
||||||
__small_sprintf (tmp, "\033[M%c", b + ' ');
|
__small_sprintf (tmp, "\033[M%c", b + ' ');
|
||||||
nread = 4;
|
nread = 4;
|
||||||
/* the neat nested encoding function of mintty
|
/* the neat nested encoding function of mintty
|
||||||
does not compile in g++, so let's unfold it: */
|
does not compile in g++, so let's unfold it: */
|
||||||
if (xcode < 0x80)
|
if (xcode < 0x80)
|
||||||
tmp [nread++] = xcode;
|
tmp [nread++] = xcode;
|
||||||
@ -692,9 +692,9 @@ fhandler_console::read (void *pv, size_t& buflen)
|
|||||||
if (dev_state.use_focus)
|
if (dev_state.use_focus)
|
||||||
{
|
{
|
||||||
if (input_rec.Event.FocusEvent.bSetFocus)
|
if (input_rec.Event.FocusEvent.bSetFocus)
|
||||||
__small_sprintf (tmp, "\033[I");
|
__small_sprintf (tmp, "\033[I");
|
||||||
else
|
else
|
||||||
__small_sprintf (tmp, "\033[O");
|
__small_sprintf (tmp, "\033[O");
|
||||||
|
|
||||||
toadd = tmp;
|
toadd = tmp;
|
||||||
nread = 3;
|
nread = 3;
|
||||||
|
@ -1205,7 +1205,7 @@ format_process_mountstuff (void *data, char *&destbuf, bool mountinfo)
|
|||||||
{
|
{
|
||||||
WCHAR drive[3] = { mnt->mnt_fsname[0], L':', L'\0' };
|
WCHAR drive[3] = { mnt->mnt_fsname[0], L':', L'\0' };
|
||||||
disk_type dt = get_disk_type (drive);
|
disk_type dt = get_disk_type (drive);
|
||||||
|
|
||||||
if (dt == DT_SHARE_SMB || dt == DT_SHARE_NFS)
|
if (dt == DT_SHARE_SMB || dt == DT_SHARE_NFS)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -91,7 +91,7 @@ static int osi;
|
|||||||
|
|
||||||
void
|
void
|
||||||
fhandler_pty_master::flush_to_slave ()
|
fhandler_pty_master::flush_to_slave ()
|
||||||
{
|
{
|
||||||
if (get_readahead_valid () && !(get_ttyp ()->ti.c_lflag & ICANON))
|
if (get_readahead_valid () && !(get_ttyp ()->ti.c_lflag & ICANON))
|
||||||
accept_input ();
|
accept_input ();
|
||||||
}
|
}
|
||||||
|
@ -250,7 +250,7 @@ class lockf_t
|
|||||||
uint16_t lf_type; /* Lock type: F_RDLCK, F_WRLCK */
|
uint16_t lf_type; /* Lock type: F_RDLCK, F_WRLCK */
|
||||||
_off64_t lf_start; /* Byte # of the start of the lock */
|
_off64_t lf_start; /* Byte # of the start of the lock */
|
||||||
_off64_t lf_end; /* Byte # of the end of the lock (-1=EOF) */
|
_off64_t lf_end; /* Byte # of the end of the lock (-1=EOF) */
|
||||||
int64_t lf_id; /* Cygwin PID for POSIX locks, a unique id per
|
int64_t lf_id; /* Cygwin PID for POSIX locks, a unique id per
|
||||||
file table entry for BSD flock locks. */
|
file table entry for BSD flock locks. */
|
||||||
DWORD lf_wid; /* Win PID of the resource holding the lock */
|
DWORD lf_wid; /* Win PID of the resource holding the lock */
|
||||||
uint16_t lf_ver; /* Version number of the lock. If a released
|
uint16_t lf_ver; /* Version number of the lock. If a released
|
||||||
|
@ -178,7 +178,7 @@ static int glob1(Char *, glob_t *, size_t *);
|
|||||||
static int glob2(Char *, Char *, Char *, Char *, glob_t *, size_t *);
|
static int glob2(Char *, Char *, Char *, Char *, glob_t *, size_t *);
|
||||||
static int glob3(Char *, Char *, Char *, Char *, Char *, glob_t *, size_t *);
|
static int glob3(Char *, Char *, Char *, Char *, Char *, glob_t *, size_t *);
|
||||||
static int globextend(const Char *, glob_t *, size_t *);
|
static int globextend(const Char *, glob_t *, size_t *);
|
||||||
static const Char *
|
static const Char *
|
||||||
globtilde(const Char *, Char *, size_t, glob_t *);
|
globtilde(const Char *, Char *, size_t, glob_t *);
|
||||||
static int globexp1(const Char *, glob_t *, size_t *);
|
static int globexp1(const Char *, glob_t *, size_t *);
|
||||||
static int globexp2(const Char *, const Char *, glob_t *, int *, size_t *);
|
static int globexp2(const Char *, const Char *, glob_t *, int *, size_t *);
|
||||||
@ -399,8 +399,8 @@ globtilde(const Char *pattern, Char *patbuf, size_t patbuf_len, glob_t *pglob)
|
|||||||
if (*pattern != TILDE || !(pglob->gl_flags & GLOB_TILDE))
|
if (*pattern != TILDE || !(pglob->gl_flags & GLOB_TILDE))
|
||||||
return pattern;
|
return pattern;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copy up to the end of the string or /
|
* Copy up to the end of the string or /
|
||||||
*/
|
*/
|
||||||
eb = &patbuf[patbuf_len - 1];
|
eb = &patbuf[patbuf_len - 1];
|
||||||
for (p = pattern + 1, h = (char *) patbuf;
|
for (p = pattern + 1, h = (char *) patbuf;
|
||||||
|
@ -57,7 +57,7 @@ bool allow_glob = true;
|
|||||||
bool ignore_case_with_glob = false;
|
bool ignore_case_with_glob = false;
|
||||||
bool dos_file_warning = true;
|
bool dos_file_warning = true;
|
||||||
bool allow_winsymlinks = false;
|
bool allow_winsymlinks = false;
|
||||||
bool reset_com = false;
|
bool reset_com = false;
|
||||||
bool pipe_byte = false;
|
bool pipe_byte = false;
|
||||||
bool detect_bloda = false;
|
bool detect_bloda = false;
|
||||||
|
|
||||||
|
@ -329,7 +329,7 @@ hook_or_detect_cygwin (const char *name, const void *fn, WORD& subsys, HANDLE h)
|
|||||||
return NULL;
|
return NULL;
|
||||||
pdfirst = rva (PIMAGE_IMPORT_DESCRIPTOR, map, importRVA - offset);
|
pdfirst = rva (PIMAGE_IMPORT_DESCRIPTOR, map, importRVA - offset);
|
||||||
/* ... carefully check the required size to fit the string table into
|
/* ... carefully check the required size to fit the string table into
|
||||||
the map as well. Allow NAME_MAX bytes for the DLL name, but don't
|
the map as well. Allow NAME_MAX bytes for the DLL name, but don't
|
||||||
go beyond the remainder of the section. */
|
go beyond the remainder of the section. */
|
||||||
if (importRVAMaxSize - importRVASize > wincap.allocation_granularity ())
|
if (importRVAMaxSize - importRVASize > wincap.allocation_granularity ())
|
||||||
{
|
{
|
||||||
|
@ -516,33 +516,33 @@ thread_wrapper (VOID *arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
__asm__ ("\n\
|
__asm__ ("\n\
|
||||||
movl %[WRAPPER_ARG], %%ebx # Load &wrapper_arg into ebx \n\
|
movl %[WRAPPER_ARG], %%ebx # Load &wrapper_arg into ebx \n\
|
||||||
movl (%%ebx), %%eax # Load thread func into eax \n\
|
movl (%%ebx), %%eax # Load thread func into eax \n\
|
||||||
movl 4(%%ebx), %%ecx # Load thread arg into ecx \n\
|
movl 4(%%ebx), %%ecx # Load thread arg into ecx \n\
|
||||||
movl 8(%%ebx), %%edx # Load stackaddr into edx \n\
|
movl 8(%%ebx), %%edx # Load stackaddr into edx \n\
|
||||||
movl 12(%%ebx), %%ebx # Load stackbase into ebx \n\
|
movl 12(%%ebx), %%ebx # Load stackbase into ebx \n\
|
||||||
subl %[CYGTLS], %%ebx # Subtract CYGTLS_PADSIZE \n\
|
subl %[CYGTLS], %%ebx # Subtract CYGTLS_PADSIZE \n\
|
||||||
subl $4, %%ebx # Subtract another 4 bytes \n\
|
subl $4, %%ebx # Subtract another 4 bytes \n\
|
||||||
movl %%ebx, %%esp # Set esp \n\
|
movl %%ebx, %%esp # Set esp \n\
|
||||||
xorl %%ebp, %%ebp # Set ebp to 0 \n\
|
xorl %%ebp, %%ebp # Set ebp to 0 \n\
|
||||||
# Make gcc 3.x happy and align the stack so that it is \n\
|
# Make gcc 3.x happy and align the stack so that it is \n\
|
||||||
# 16 byte aligned right before the final call opcode. \n\
|
# 16 byte aligned right before the final call opcode. \n\
|
||||||
andl $-16, %%esp # 16 byte align \n\
|
andl $-16, %%esp # 16 byte align \n\
|
||||||
addl $-12, %%esp # 12 bytes + 4 byte arg = 16 \n\
|
addl $-12, %%esp # 12 bytes + 4 byte arg = 16 \n\
|
||||||
# Now we moved to the new stack. Save thread func address\n\
|
# Now we moved to the new stack. Save thread func address \n\
|
||||||
# and thread arg on new stack \n\
|
# and thread arg on new stack \n\
|
||||||
pushl %%ecx # Push thread arg onto stack \n\
|
pushl %%ecx # Push thread arg onto stack \n\
|
||||||
pushl %%eax # Push thread func onto stack \n\
|
pushl %%eax # Push thread func onto stack \n\
|
||||||
# Now it's safe to release the OS stack. \n\
|
# Now it's safe to release the OS stack. \n\
|
||||||
pushl $0x8000 # dwFreeType: MEM_RELEASE \n\
|
pushl $0x8000 # dwFreeType: MEM_RELEASE \n\
|
||||||
pushl $0x0 # dwSize: 0 \n\
|
pushl $0x0 # dwSize: 0 \n\
|
||||||
pushl %%edx # lpAddress: stackaddr \n\
|
pushl %%edx # lpAddress: stackaddr \n\
|
||||||
call _VirtualFree@12 # Shoot \n\
|
call _VirtualFree@12 # Shoot \n\
|
||||||
# All set. We can pop the thread function address from \n\
|
# All set. We can pop the thread function address from \n\
|
||||||
# the stack and call it. The thread arg is still on the \n\
|
# the stack and call it. The thread arg is still on the \n\
|
||||||
# stack in the expected spot. \n\
|
# stack in the expected spot. \n\
|
||||||
popl %%eax # Pop thread_func address \n\
|
popl %%eax # Pop thread_func address \n\
|
||||||
call *%%eax # Call thread func \n"
|
call *%%eax # Call thread func \n"
|
||||||
: : [WRAPPER_ARG] "r" (&wrapper_arg),
|
: : [WRAPPER_ARG] "r" (&wrapper_arg),
|
||||||
[CYGTLS] "i" (CYGTLS_PADSIZE));
|
[CYGTLS] "i" (CYGTLS_PADSIZE));
|
||||||
/* Never return from here. */
|
/* Never return from here. */
|
||||||
|
@ -97,11 +97,11 @@ win32_device_name (const char *src_path, char *win32_path, device& dev)
|
|||||||
#define SAMBA_EXTENDED_INFO_VERSION_STRING_LENGTH 28
|
#define SAMBA_EXTENDED_INFO_VERSION_STRING_LENGTH 28
|
||||||
#pragma pack(push,4)
|
#pragma pack(push,4)
|
||||||
struct smb_extended_info {
|
struct smb_extended_info {
|
||||||
DWORD samba_magic; /* Always SAMBA_EXTENDED_INFO_MAGIC */
|
DWORD samba_magic; /* Always SAMBA_EXTENDED_INFO_MAGIC */
|
||||||
DWORD samba_version; /* Major/Minor/Release/Revision */
|
DWORD samba_version; /* Major/Minor/Release/Revision */
|
||||||
DWORD samba_subversion; /* Prerelease/RC/Vendor patch */
|
DWORD samba_subversion; /* Prerelease/RC/Vendor patch */
|
||||||
LARGE_INTEGER samba_gitcommitdate;
|
LARGE_INTEGER samba_gitcommitdate;
|
||||||
char samba_version_string[SAMBA_EXTENDED_INFO_VERSION_STRING_LENGTH];
|
char samba_version_string[SAMBA_EXTENDED_INFO_VERSION_STRING_LENGTH];
|
||||||
};
|
};
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ details. */
|
|||||||
#define USE_SYS_TYPES_FD_SET
|
#define USE_SYS_TYPES_FD_SET
|
||||||
#define __WSA_ERR_MACROS_DEFINED
|
#define __WSA_ERR_MACROS_DEFINED
|
||||||
/* FIXME: Collision with different declarations of if_nametoindex and
|
/* FIXME: Collision with different declarations of if_nametoindex and
|
||||||
if_indextoname functions in iphlpapi.h since Vista.
|
if_indextoname functions in iphlpapi.h since Vista.
|
||||||
TODO: Convert if_nametoindex to cygwin_if_nametoindex and call
|
TODO: Convert if_nametoindex to cygwin_if_nametoindex and call
|
||||||
system functions on Vista and later. */
|
system functions on Vista and later. */
|
||||||
#define _INC_NETIOAPI
|
#define _INC_NETIOAPI
|
||||||
|
@ -892,7 +892,7 @@ is_virtual_symlink:
|
|||||||
else if (isdev_dev (dev))
|
else if (isdev_dev (dev))
|
||||||
{
|
{
|
||||||
/* If we're looking for a file below /dev, which doesn't exist,
|
/* If we're looking for a file below /dev, which doesn't exist,
|
||||||
make sure that the device type is converted to FH_FS, so that
|
make sure that the device type is converted to FH_FS, so that
|
||||||
subsequent code handles the file correctly.
|
subsequent code handles the file correctly.
|
||||||
Unless /dev itself doesn't exist on disk. In that case /dev
|
Unless /dev itself doesn't exist on disk. In that case /dev
|
||||||
is handled as virtual filesystem, and virtual filesystems are
|
is handled as virtual filesystem, and virtual filesystems are
|
||||||
@ -3704,7 +3704,7 @@ find_fast_cwd_pointer ()
|
|||||||
if (movedi[0] == 0x8b && movedi[1] == 0xff) /* mov edi,edi -> W8 */
|
if (movedi[0] == 0x8b && movedi[1] == 0xff) /* mov edi,edi -> W8 */
|
||||||
{
|
{
|
||||||
/* Windows 8 CP 32 bit (after a Windows Update?) does not call
|
/* Windows 8 CP 32 bit (after a Windows Update?) does not call
|
||||||
RtlEnterCriticalSection. For some reason the function manipulates
|
RtlEnterCriticalSection. For some reason the function manipulates
|
||||||
the FastPebLock manually, kind of like RtlEnterCriticalSection has
|
the FastPebLock manually, kind of like RtlEnterCriticalSection has
|
||||||
been converted to an inline function.
|
been converted to an inline function.
|
||||||
|
|
||||||
|
@ -304,7 +304,7 @@ pinfo::init (pid_t n, DWORD flag, HANDLE h0)
|
|||||||
memset (procinfo, 0, sizeof (*procinfo));
|
memset (procinfo, 0, sizeof (*procinfo));
|
||||||
created = true; /* Lie that we created this - just reuse old
|
created = true; /* Lie that we created this - just reuse old
|
||||||
shared memory */
|
shared memory */
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((procinfo->process_state & PID_REAPED)
|
if ((procinfo->process_state & PID_REAPED)
|
||||||
|| ((procinfo->process_state & PID_INITIALIZING) && (flag & PID_NOREDIR)
|
|| ((procinfo->process_state & PID_INITIALIZING) && (flag & PID_NOREDIR)
|
||||||
|
@ -188,7 +188,7 @@ do_pseudo_reloc (void * start, void * end, void * base)
|
|||||||
* 1) With a (v2-style) version header. In this case, the
|
* 1) With a (v2-style) version header. In this case, the
|
||||||
* first entry in the list is a 3-DWORD structure, with
|
* first entry in the list is a 3-DWORD structure, with
|
||||||
* value:
|
* value:
|
||||||
* { 0, 0, RP_VERSION_V1 }
|
* { 0, 0, RP_VERSION_V1 }
|
||||||
* In this case, we skip to the next entry in the list,
|
* In this case, we skip to the next entry in the list,
|
||||||
* knowing that all elements after the head item can
|
* knowing that all elements after the head item can
|
||||||
* be cast to runtime_pseudo_reloc_item_v1.
|
* be cast to runtime_pseudo_reloc_item_v1.
|
||||||
|
@ -595,7 +595,7 @@ _recycler_sd (void *buf, bool users, bool dir)
|
|||||||
{
|
{
|
||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
PISECURITY_DESCRIPTOR psd = (PISECURITY_DESCRIPTOR) buf;
|
PISECURITY_DESCRIPTOR psd = (PISECURITY_DESCRIPTOR) buf;
|
||||||
|
|
||||||
if (!psd)
|
if (!psd)
|
||||||
return NULL;
|
return NULL;
|
||||||
RtlCreateSecurityDescriptor (psd, SECURITY_DESCRIPTOR_REVISION);
|
RtlCreateSecurityDescriptor (psd, SECURITY_DESCRIPTOR_REVISION);
|
||||||
@ -614,7 +614,7 @@ _recycler_sd (void *buf, bool users, bool dir)
|
|||||||
dir ? CONTAINER_INHERIT_ACE | OBJECT_INHERIT_ACE
|
dir ? CONTAINER_INHERIT_ACE | OBJECT_INHERIT_ACE
|
||||||
: NO_INHERITANCE,
|
: NO_INHERITANCE,
|
||||||
FILE_ALL_ACCESS, well_known_system_sid);
|
FILE_ALL_ACCESS, well_known_system_sid);
|
||||||
if (users)
|
if (users)
|
||||||
RtlAddAccessAllowedAceEx (dacl, ACL_REVISION, NO_PROPAGATE_INHERIT_ACE,
|
RtlAddAccessAllowedAceEx (dacl, ACL_REVISION, NO_PROPAGATE_INHERIT_ACE,
|
||||||
FILE_GENERIC_READ | FILE_GENERIC_EXECUTE
|
FILE_GENERIC_READ | FILE_GENERIC_EXECUTE
|
||||||
| FILE_APPEND_DATA | FILE_WRITE_ATTRIBUTES,
|
| FILE_APPEND_DATA | FILE_WRITE_ATTRIBUTES,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/* smallprint.cc: small print routines for WIN32
|
/* smallprint.cc: small print routines for WIN32
|
||||||
|
|
||||||
Copyright 1996, 1998, 2000, 2001, 2002, 2003, 2005, 2006,
|
Copyright 1996, 1998, 2000, 2001, 2002, 2003, 2005, 2006,
|
||||||
2007, 2008, 2009, 2012
|
2007, 2008, 2009, 2012
|
||||||
Red Hat, Inc.
|
Red Hat, Inc.
|
||||||
|
|
||||||
This file is part of Cygwin.
|
This file is part of Cygwin.
|
||||||
@ -147,15 +147,15 @@ __small_vsprintf (char *dst, const char *fmt, va_list ap)
|
|||||||
continue;
|
continue;
|
||||||
case 'c':
|
case 'c':
|
||||||
{
|
{
|
||||||
unsigned char c = (va_arg (ap, int) & 0xff);
|
unsigned char c = (va_arg (ap, int) & 0xff);
|
||||||
if (isprint (c) || pad != '0')
|
if (isprint (c) || pad != '0')
|
||||||
*dst++ = c;
|
*dst++ = c;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
*dst++ = '0';
|
*dst++ = '0';
|
||||||
*dst++ = 'x';
|
*dst++ = 'x';
|
||||||
dst = __rn (dst, 16, 0, c, len, pad, LMASK);
|
dst = __rn (dst, 16, 0, c, len, pad, LMASK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'C':
|
case 'C':
|
||||||
|
@ -465,7 +465,7 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv,
|
|||||||
PCA service. However, a process which is controlled by PCA is part
|
PCA service. However, a process which is controlled by PCA is part
|
||||||
of a compatibility job, which allows child processes to break away
|
of a compatibility job, which allows child processes to break away
|
||||||
from the job. This helps to avoid this issue.
|
from the job. This helps to avoid this issue.
|
||||||
|
|
||||||
(*) Note that this is not mintty's fault. It has just been observed
|
(*) Note that this is not mintty's fault. It has just been observed
|
||||||
with mintty in the first place. See the archives for more info:
|
with mintty in the first place. See the archives for more info:
|
||||||
http://cygwin.com/ml/cygwin-developers/2012-02/msg00018.html */
|
http://cygwin.com/ml/cygwin-developers/2012-02/msg00018.html */
|
||||||
@ -746,7 +746,7 @@ loop:
|
|||||||
/* Reset handle inheritance to default when the execution of a non-Cygwin
|
/* Reset handle inheritance to default when the execution of a non-Cygwin
|
||||||
process fails. Only need to do this for _P_OVERLAY since the handle will
|
process fails. Only need to do this for _P_OVERLAY since the handle will
|
||||||
be closed otherwise. Don't need to do this for 'parent' since it will
|
be closed otherwise. Don't need to do this for 'parent' since it will
|
||||||
be closed in every case. See FIXME above. */
|
be closed in every case. See FIXME above. */
|
||||||
if (!iscygwin () && mode == _P_OVERLAY)
|
if (!iscygwin () && mode == _P_OVERLAY)
|
||||||
SetHandleInformation (wr_proc_pipe, HANDLE_FLAG_INHERIT, HANDLE_FLAG_INHERIT);
|
SetHandleInformation (wr_proc_pipe, HANDLE_FLAG_INHERIT, HANDLE_FLAG_INHERIT);
|
||||||
if (wr_proc_pipe == my_wr_proc_pipe)
|
if (wr_proc_pipe == my_wr_proc_pipe)
|
||||||
|
@ -731,8 +731,8 @@ unlink_nt (path_conv &pc)
|
|||||||
debug_printf ("Sharing violation when opening %S",
|
debug_printf ("Sharing violation when opening %S",
|
||||||
pc.get_nt_native_path ());
|
pc.get_nt_native_path ());
|
||||||
/* We never call try_to_bin on NFS and NetApp for the follwing reasons:
|
/* We never call try_to_bin on NFS and NetApp for the follwing reasons:
|
||||||
|
|
||||||
NFS implements its own mechanism to remove in-use files, which looks
|
NFS implements its own mechanism to remove in-use files, which looks
|
||||||
quite similar to what we do in try_to_bin for remote files.
|
quite similar to what we do in try_to_bin for remote files.
|
||||||
|
|
||||||
Netapp filesystems don't understand the "move and delete" method
|
Netapp filesystems don't understand the "move and delete" method
|
||||||
|
@ -575,13 +575,13 @@ pthread::cancel ()
|
|||||||
GetThreadContext (win32_obj_id, &context);
|
GetThreadContext (win32_obj_id, &context);
|
||||||
/* The OS is not foolproof in terms of asynchronous thread cancellation
|
/* The OS is not foolproof in terms of asynchronous thread cancellation
|
||||||
and tends to hang infinitely if we change the instruction pointer.
|
and tends to hang infinitely if we change the instruction pointer.
|
||||||
So just don't cancel asynchronously if the thread is currently
|
So just don't cancel asynchronously if the thread is currently
|
||||||
executing Windows code. Rely on deferred cancellation in this case. */
|
executing Windows code. Rely on deferred cancellation in this case. */
|
||||||
if (!cygtls->inside_kernel (&context))
|
if (!cygtls->inside_kernel (&context))
|
||||||
{
|
{
|
||||||
context.Eip = (DWORD) pthread::static_cancel_self;
|
context.Eip = (DWORD) pthread::static_cancel_self;
|
||||||
SetThreadContext (win32_obj_id, &context);
|
SetThreadContext (win32_obj_id, &context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mutex.unlock ();
|
mutex.unlock ();
|
||||||
/* See above. For instance, a thread which waits for a semaphore in sem_wait
|
/* See above. For instance, a thread which waits for a semaphore in sem_wait
|
||||||
|
Loading…
x
Reference in New Issue
Block a user