| 1 |
sysadm |
1.1 |
/***************************************************************************
|
| 2 |
|
|
bbsd.c - description
|
| 3 |
|
|
-------------------
|
| 4 |
|
|
begin : Mon Oct 11 2004
|
| 5 |
|
|
copyright : (C) 2004 by Leaflet
|
| 6 |
|
|
email : leaflet@leafok.com
|
| 7 |
|
|
***************************************************************************/
|
| 8 |
|
|
|
| 9 |
|
|
/***************************************************************************
|
| 10 |
|
|
* *
|
| 11 |
|
|
* This program is free software; you can redistribute it and/or modify *
|
| 12 |
|
|
* it under the terms of the GNU General Public License as published by *
|
| 13 |
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
| 14 |
|
|
* (at your option) any later version. *
|
| 15 |
|
|
* *
|
| 16 |
|
|
***************************************************************************/
|
| 17 |
|
|
|
| 18 |
|
|
#include "common.h"
|
| 19 |
|
|
|
| 20 |
|
|
int
|
| 21 |
|
|
main (int argc, char *argv[])
|
| 22 |
|
|
{
|
| 23 |
|
|
FILE *fp;
|
| 24 |
|
|
time_t t;
|
| 25 |
|
|
|
| 26 |
|
|
init_daemon ();
|
| 27 |
|
|
|
| 28 |
|
|
while (1)
|
| 29 |
|
|
{
|
| 30 |
|
|
sleep (60);
|
| 31 |
|
|
if ((fp = fopen ("bbsd.log", "a")) >= 0)
|
| 32 |
|
|
{
|
| 33 |
|
|
t = time (0);
|
| 34 |
|
|
fprintf (fp, "I'm here at %s\n", asctime (localtime (&t)));
|
| 35 |
|
|
fclose (fp);
|
| 36 |
|
|
}
|
| 37 |
|
|
}
|
| 38 |
|
|
|
| 39 |
|
|
return 0;
|
| 40 |
|
|
}
|