t-event.c revision 49218d4f8e4d84d1c08aeb267bcf6e451f2056dc
/*
* Copyright (c) 2001-2002, 2004 Sendmail, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#endif /* SM_CONF_SETITIMER */
static int check;
static void
int arg;
{
check++;
}
static void
int arg;
{
}
/* define as x if you want debug output */
#define DBG_OUT(x)
int
int argc;
char *argv[];
{
fprintf(stdout, "This test may hang. If there is no output within twelve seconds, abort it\nand recompile with -DSM_CONF_SETITIMER=%d\n",
SM_CONF_SETITIMER == 0 ? 1 : 0);
sleep(1);
sleep(1);
/* schedule an event in 9s */
sleep(1);
/* clear the event before it can fire */
/* schedule an event in 1s */
check = 0;
sleep(2);
/* clear the event */
return sm_test_end();
}