mirror of
https://github.com/falk-werner/webfused
synced 2026-03-02 04:09:19 +00:00
separated main
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
#include "webfused/daemon.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -154,7 +156,7 @@ static void on_interrupt(int signal_id)
|
||||
shutdown_requested = true;
|
||||
}
|
||||
|
||||
int main(int argc, char * argv[])
|
||||
int wfd_daemon_run(int argc, char * argv[])
|
||||
{
|
||||
struct args args;
|
||||
args.config = wf_server_config_create();
|
||||
15
src/webfused/daemon.h
Normal file
15
src/webfused/daemon.h
Normal file
@@ -0,0 +1,15 @@
|
||||
#ifndef WFD_DAEMON_H
|
||||
#define WFD_DAEMON_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
extern int wfd_daemon_run(int argc, char * argv[]);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
6
src/webfused/main.c
Normal file
6
src/webfused/main.c
Normal file
@@ -0,0 +1,6 @@
|
||||
#include "webfused/daemon.h"
|
||||
|
||||
int main(int argc, char * argv[])
|
||||
{
|
||||
return wfd_daemon_run(argc, argv);
|
||||
}
|
||||
Reference in New Issue
Block a user