summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbjh <bjh@13f79535-47bb-0310-9956-ffa450edef68>2000-05-27 18:01:00 +0000
committerbjh <bjh@13f79535-47bb-0310-9956-ffa450edef68>2000-05-27 18:01:00 +0000
commit698b26c055a630c4853064d911c4a76090e43dc4 (patch)
treeb13d66d6344b8a2e80504d2ec27166fd6c1b29da
parent08f942fb5a96e04b8342456cbb83469434dbf1e6 (diff)
downloadlibapr-698b26c055a630c4853064d911c4a76090e43dc4.tar.gz
OS/2: Add an implementation of ap_file_check_read().
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60107 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--file_io/os2/readwrite.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/file_io/os2/readwrite.c b/file_io/os2/readwrite.c
index dd44cece8..fb0c5d2e6 100644
--- a/file_io/os2/readwrite.c
+++ b/file_io/os2/readwrite.c
@@ -345,3 +345,18 @@ APR_EXPORT(int) ap_fprintf(ap_file_t *fptr, const char *format, ...)
}
+
+ap_status_t ap_file_check_read(ap_file_t *fd)
+{
+ int rc;
+
+ if (!fd->pipe)
+ return APR_SUCCESS; /* Not a pipe, assume no waiting */
+
+ rc = DosWaitEventSem(fd->pipeSem, SEM_IMMEDIATE_RETURN);
+
+ if (rc == ERROR_TIMEOUT)
+ return APR_TIMEUP;
+
+ return APR_OS2_STATUS(rc);
+}