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

Revision 12350, 901 bytes checked in by ghudson, 26 years ago (diff)
Some RCS ID cleanup: delete $Log$ and replace other RCS keywords with $Id$.
RevLine 
[171]1/*
2 *
[1939]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 *
[171]10 * disserve.c -- Simple top level program for test.
11 *
[12350]12 * $Id: disserve.c,v 1.5 1999-01-22 23:10:17 ghudson Exp $
[171]13 */
[1506]14
[171]15#include <stdio.h>
[1506]16#include <syslog.h>
[171]17extern char *error_message();
18
[1506]19int main (argc,argv)
20    int argc;
21    char **argv;
[171]22{
[1506]23    int code;
[171]24
[1506]25#ifndef SUBPROC
[1921]26#ifdef LOG_DAEMON
[1506]27    openlog ("discuss", LOG_PID, LOG_DAEMON);
[1921]28#else
29    openlog ("discuss", LOG_PID);
[1506]30#endif
[1921]31#endif
[1506]32    init_rpc("discuss",&code);
33    if (code) {
34#ifndef SUBPROC
35        syslog (LOG_ERR, "RPC initialization failed: %s",
36                error_message (code));
37#else
[171]38        fprintf(stderr, "%s\n", error_message(code));
[1506]39#endif
[171]40        exit(1);
[1506]41    }
42    while (!code)
43        recvit (&code);
44    return 0;
[171]45}
Note: See TracBrowser for help on using the repository browser.