i386 removal, part 59/x: Revert a i386 specific local change in dma(8).
[dragonfly.git] / contrib / tcp_wrappers / clean_exit.c
blob6fbbbb48435775ad8744a46786aff751650f7683
1 /*
2 * clean_exit() cleans up and terminates the program. It should be called
3 * instead of exit() when for some reason the real network daemon will not or
4 * cannot be run. Reason: in the case of a datagram-oriented service we must
5 * discard the not-yet received data from the client. Otherwise, inetd will
6 * see the same datagram again and again, and go into a loop.
7 *
8 * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
9 */
11 #include <stdio.h>
12 #include <unistd.h>
14 extern void exit();
16 #include "tcpd.h"
18 /* clean_exit - clean up and exit */
20 void clean_exit(request)
21 struct request_info *request;
25 * In case of unconnected protocols we must eat up the not-yet received
26 * data or inetd will loop.
29 if (request->sink)
30 request->sink(request->fd);
33 * Be kind to the inetd. We already reported the problem via the syslogd,
34 * and there is no need for additional garbage in the logfile.
37 sleep(5);
38 exit(0);