summaryrefslogtreecommitdiff
path: root/test/testoc.c
diff options
context:
space:
mode:
authorJeff Trawick <trawick@apache.org>2001-08-02 21:07:04 +0000
committerJeff Trawick <trawick@apache.org>2001-08-02 21:07:04 +0000
commit3fd1ed0d91debf2d4af174ca90a661a05d659a7b (patch)
tree325e356f78a70bf88433bca6e5eb31c49a24b2be /test/testoc.c
parent9b81f33c9507c5d398f945336125be3097cdc00d (diff)
downloadapr-3fd1ed0d91debf2d4af174ca90a661a05d659a7b.tar.gz
use exit status 0 for success in testdir, testoc, and testproc
since testoc depends on occhild, build occhild when testoc is built add some trivial error code display logic to testoc git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@62093 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/testoc.c')
-rw-r--r--test/testoc.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/testoc.c b/test/testoc.c
index 701f7439e..fa486afd2 100644
--- a/test/testoc.c
+++ b/test/testoc.c
@@ -92,6 +92,7 @@ static void ocmaint(int reason, void *data, int status)
int main(int argc, char *argv[])
{
#if APR_HAS_OTHER_CHILD
+ apr_status_t rv;
apr_pool_t *context;
apr_proc_t newproc;
apr_procattr_t *procattr = NULL;
@@ -143,8 +144,11 @@ int main(int argc, char *argv[])
fprintf(stdout, "[PARENT] Sending SIGKILL to child......");
fflush(stdout);
apr_sleep(1 * APR_USEC_PER_SEC);
- if (apr_proc_kill(&newproc, SIGKILL) != APR_SUCCESS) {
- fprintf(stderr,"couldn't send the signal!\n");
+ if ((rv = apr_proc_kill(&newproc, SIGKILL)) != APR_SUCCESS) {
+ char msgbuf[120];
+
+ fprintf(stderr,"couldn't send the signal: %d/%s!\n",
+ rv, apr_strerror(rv, msgbuf, sizeof msgbuf));
exit(-1);
}
fprintf(stdout,"OK\n");
@@ -159,6 +163,6 @@ int main(int argc, char *argv[])
fprintf(stdout, "Other_child is not supported on this platform\n");
#endif
- return 1;
+ return 0;
}