summaryrefslogtreecommitdiff
path: root/src/testing/nosleep.c
blob: dbbe40bafdb2b43e8fd58e5d20d60baeeea8370b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*++
/* NAME
/*	nosleep 3
/* SUMMARY
/*	override the system sleep(3) implementation
/* SYNOPSIS
/*	LD_PRELOAD=/path/to/nosleep.so command....
/*
/*	int	sleep(unsigned int seconds)
/* DESCRIPTION
/*	This sleep(3) implementation returns zero immediately. The purpose
/*	is to speed up error handler tests by skipping the delay between
/*	reporting a fatal error and before terminating the process.
/* LICENSE
/* .ad
/* .fi
/*	The Secure Mailer license must be distributed with this software.
/* AUTHOR(S)
/*	Wietse Venema
/*	porcupine.org
/*--*/

#include <unistd.h>

unsigned int sleep(unsigned int seconds)
{
    /* Don't sleep. */
    return (0);
}