diff options
author | 2001-08-11 15:01:57 +0000 | |
---|---|---|
committer | 2001-08-11 15:01:57 +0000 | |
commit | 1fe5612d30c28ddff9e35e5b49c545ff5bb6a024 (patch) | |
tree | 85b6279ece6383e4ea058c1f24b2e68b31a90133 /lib/libc_r | |
parent | Avoid an infinite loop if the last iov_len is 0; from FreeBSD. (diff) | |
download | wireguard-openbsd-1fe5612d30c28ddff9e35e5b49c545ff5bb6a024.tar.xz wireguard-openbsd-1fe5612d30c28ddff9e35e5b49c545ff5bb6a024.zip |
add missing _thread_enter_cancellation_point() before going further.
Diffstat (limited to 'lib/libc_r')
-rw-r--r-- | lib/libc_r/uthread/uthread_write.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libc_r/uthread/uthread_write.c b/lib/libc_r/uthread/uthread_write.c index 42a1f193243..05c83bbcd22 100644 --- a/lib/libc_r/uthread/uthread_write.c +++ b/lib/libc_r/uthread/uthread_write.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uthread_write.c,v 1.6 2000/01/06 07:23:24 d Exp $ */ +/* $OpenBSD: uthread_write.c,v 1.7 2001/08/11 15:01:57 fgsch Exp $ */ /* * Copyright (c) 1995-1998 John Birrell <jb@cimlogic.com.au> * All rights reserved. @@ -51,6 +51,9 @@ write(int fd, const void *buf, size_t nbytes) ssize_t num = 0; ssize_t ret; + /* This is a cancellation point: */ + _thread_enter_cancellation_point(); + /* POSIX says to do just this: */ if (nbytes == 0) ret = 0; |