Windows: add pthread_sigmask() that does nothing
A previous change introduced a call to pthread_sigmask() in order to block SIGPIPE in a thread. Since there are no signal facilities on Windows that are similar to POSIX signals, just ignore the request to block the signal. In the particular case, the effect of blocking SIGPIPE on POSIX is that write() calls return EPIPE when the reader closes the pipe. This is how write() behaves on Windows. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
c4b27511ab
commit
f924b52a77
@ -124,6 +124,7 @@ static inline int fcntl(int fd, int cmd, ...)
|
||||
#define sigemptyset(x) (void)0
|
||||
static inline int sigaddset(sigset_t *set, int signum)
|
||||
{ return 0; }
|
||||
#define SIG_BLOCK 0
|
||||
#define SIG_UNBLOCK 0
|
||||
static inline int sigprocmask(int how, const sigset_t *set, sigset_t *oldset)
|
||||
{ return 0; }
|
||||
|
@ -101,4 +101,9 @@ static inline void *pthread_getspecific(pthread_key_t key)
|
||||
return TlsGetValue(key);
|
||||
}
|
||||
|
||||
static inline int pthread_sigmask(int how, const sigset_t *set, sigset_t *oset)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* PTHREAD_H */
|
||||
|
Loading…
Reference in New Issue
Block a user