summaryrefslogtreecommitdiff
path: root/test/testmmap.c
diff options
context:
space:
mode:
authorrbb <rbb@13f79535-47bb-0310-9956-ffa450edef68>1999-12-03 15:18:49 +0000
committerrbb <rbb@13f79535-47bb-0310-9956-ffa450edef68>1999-12-03 15:18:49 +0000
commite25a953d65012b5c7c05f4d25b0ded43b82c1f65 (patch)
tree0c1f9343452dc2ccbcbd08ab07346ecc1ae8d293 /test/testmmap.c
parent6fab83b33a96c54b2f029f4f43de662f1d6656dc (diff)
downloadlibapr-e25a953d65012b5c7c05f4d25b0ded43b82c1f65.tar.gz
Fix the logic in blocking vs non-blocking pipes to children. It only
makes sense to change the blocking attributes of a pipe if we actually are successful in creating the pipe. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@59501 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/testmmap.c')
-rw-r--r--test/testmmap.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/test/testmmap.c b/test/testmmap.c
index f7b4b61d4..722ef2437 100644
--- a/test/testmmap.c
+++ b/test/testmmap.c
@@ -53,6 +53,7 @@
*
*/
#include <stdio.h>
+#include <unistd.h>
#include <string.h>
#include "apr_mmap.h"
#include "apr_errno.h"
@@ -69,7 +70,6 @@ int main()
{
ap_context_t *context;
ap_mmap_t *themmap = NULL;
- ap_status_t status = 0;
ap_file_t *thefile;
ap_int32_t flag = APR_READ;
char *file1;
@@ -87,13 +87,6 @@ int main()
getcwd(file1, PATH_LEN);
strncat(file1,"/testmmap.c",11);
- fprintf(stdout,"Trying to mmap file.................");
- if (ap_mmap_create(&themmap, file1, context) != APR_SUCCESS) {
- fprintf(stderr,"Failed.\n");
- exit (-1);
- }
- fprintf(stdout,"OK\n");
-
fprintf(stdout,"Trying to delete the mmap file......");
if (ap_mmap_delete(themmap) != APR_SUCCESS) {
fprintf(stderr,"Failed!\n");
@@ -111,7 +104,7 @@ int main()
}
fprintf(stdout,"Trying to mmap the open file........");
- if (ap_mmap_open_create(&themmap, thefile, context) != APR_SUCCESS) {
+ if (ap_mmap_create(&themmap, thefile, 0, 0, context) != APR_SUCCESS) {
fprintf(stderr,"Failed!\n");
exit(-1);
}