/* ** Copyright 2000 Double Precision, Inc. See COPYING for ** distribution information. */ #include "courier_auth_config.h" #include #include #include #if HAVE_UNISTD_H #include #endif #include #include #include #include #include #include #include "authwait.h" static const char rcsid[]="$Id: authdaemontest.c,v 1.2 2004/10/21 00:10:49 mrsam Exp $"; static int runtest(int count, char **argv) { int i; pid_t p; int waitstat; int x; for (i=0; i= 0 || errno != ECHILD) { x=1; if (WIFEXITED(waitstat)) x=WEXITSTATUS(waitstat); if (x) rc=1; } return (rc); } static int dotest(int nchildren, int count, char **argv) { pid_t p; int i; signal(SIGCHLD, SIG_DFL); for (i=0; i= 4) { int nchildren=atoi(argv[1]); int count=atoi(argv[2]); if (nchildren > 0 && count > 0) exit(dotest(nchildren, count, argv+3)); } fprintf(stderr, "Usage: authdaemontest [nchildren] [count] ./authtest [userid] [password]\n"); exit(1); return (1); }