source: trunk/athena/bin/discuss/server/disserve.c @ 1939

Revision 1939, 1.1 KB checked in by srz, 36 years ago (diff)
Added standard copyright notice.
Line 
1/*
2 *
3 *      Copyright (C) 1988, 1989 by the Massachusetts Institute of Technology
4 *      Developed by the MIT Student Information Processing Board (SIPB).
5 *      For copying information, see the file mit-copyright.h in this release.
6 *
7 */
8/*
9 *
10 * disserve.c -- Simple top level program for test.
11 *
12 * $Header: /afs/dev.mit.edu/source/repository/athena/bin/discuss/server/disserve.c,v 1.4 1989-06-03 00:42:58 srz Exp $
13 * $Log: not supported by cvs2svn $
14 * Revision 1.3  89/06/01  16:26:56  srz
15 * John Kohl's patch for Ultrix 3.0.
16 *
17 * Revision 1.2  88/10/08  01:38:16  raeburn
18 * Added some syslog code.
19 *
20 */
21
22#include <stdio.h>
23#include <syslog.h>
24extern char *error_message();
25
26int main (argc,argv)
27    int argc;
28    char **argv;
29{
30    int code;
31
32#ifndef SUBPROC
33#ifdef LOG_DAEMON
34    openlog ("discuss", LOG_PID, LOG_DAEMON);
35#else
36    openlog ("discuss", LOG_PID);
37#endif
38#endif
39    init_rpc("discuss",&code);
40    if (code) {
41#ifndef SUBPROC
42        syslog (LOG_ERR, "RPC initialization failed: %s",
43                error_message (code));
44#else
45        fprintf(stderr, "%s\n", error_message(code));
46#endif
47        exit(1);
48    }
49    while (!code)
50        recvit (&code);
51    return 0;
52}
Note: See TracBrowser for help on using the repository browser.