mycodaemon_nodaemon.c 351 B

12345678910111213141516171819202122
  1. /*
  2. * mycodaemon.c
  3. */
  4. #include <stdio.h>
  5. #include <stdlib.h>
  6. #include <unistd.h>
  7. #include <signal.h>
  8. #include <sys/types.h>
  9. #include <sys/stat.h>
  10. #include <syslog.h>
  11. #include "../src/myco-daemon.c"
  12. int main() {
  13. if (myco_daemon_start(getpid(), "127.0.0.1", "127.0.0.1") == -1) {
  14. return EXIT_FAILURE;
  15. }
  16. return EXIT_SUCCESS;
  17. }