From d8ce4dc2e530a68e79db324a085d434a2004c964 Mon Sep 17 00:00:00 2001 From: leitner Date: Sun, 7 Mar 2004 21:48:56 +0000 Subject: [PATCH] fix signal race (Scott Lamb) --- CHANGES | 1 + io/io_tryread.c | 2 +- io/io_trywrite.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 9271c66..8f0ab54 100644 --- a/CHANGES +++ b/CHANGES @@ -3,6 +3,7 @@ add io_passfd and io_receivefd (and test/fdpassing.c) io_trywrite and io_waitwrite not ignore SIGPIPE add man pages for libio, safemult + fix possible signal race in io_tryread and io_trywrite (Scott Lamb) 0.18: make libowfat compile on BSD again (sorry, and thanks to everyone who diff --git a/io/io_tryread.c b/io/io_tryread.c index 2bbcb12..a3d1b58 100644 --- a/io/io_tryread.c +++ b/io/io_tryread.c @@ -21,7 +21,7 @@ int64 io_tryread(int64 d,char* buf,int64 len) { e->next_read=-1; return -1; } - new.it_interval.tv_usec=0; + new.it_interval.tv_usec=10000; new.it_interval.tv_sec=0; new.it_value.tv_usec=10000; new.it_value.tv_sec=0; diff --git a/io/io_trywrite.c b/io/io_trywrite.c index c9b2cd5..bde617e 100644 --- a/io/io_trywrite.c +++ b/io/io_trywrite.c @@ -22,7 +22,7 @@ int64 io_trywrite(int64 d,const char* buf,int64 len) { e->next_write=-1; return -1; } - new.it_interval.tv_usec=0; + new.it_interval.tv_usec=10000; new.it_interval.tv_sec=0; new.it_value.tv_usec=10000; new.it_value.tv_sec=0;