1
0
Fork 0
mirror of https://github.com/kakwa/uts-server synced 2025-07-04 12:37:08 +02:00

reformat source code

This commit is contained in:
kakwa 2016-08-23 19:38:07 +02:00
parent 4e8693da48
commit 291f58bd7e
6 changed files with 343 additions and 362 deletions

View file

@ -7,8 +7,7 @@
#include <syslog.h>
#include "utils.h"
void skeleton_daemon()
{
void skeleton_daemon() {
pid_t pid;
/* Fork off the parent process */
@ -27,7 +26,7 @@ void skeleton_daemon()
exit(EXIT_FAILURE);
/* Catch, ignore and handle signals */
//TODO: Implement a working signal handler */
// TODO: Implement a working signal handler */
signal(SIGCHLD, SIG_IGN);
signal(SIGHUP, SIG_IGN);
@ -51,11 +50,10 @@ void skeleton_daemon()
/* Close all open file descriptors */
int x;
for (x = sysconf(_SC_OPEN_MAX); x>0; x--)
{
close (x);
for (x = sysconf(_SC_OPEN_MAX); x > 0; x--) {
close(x);
}
/* Open the log file */
openlog ("firstdaemon", LOG_PID, LOG_DAEMON);
openlog("firstdaemon", LOG_PID, LOG_DAEMON);
}