mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2025-04-21 12:27:27 +03:00
tools/lib/: new helper function for daemonification
- include/daemon.h (daemonize), lib/daemon.c: shed all ties with the process' previous surroundings - lib/Makefile (OBJS): added daemon.o
This commit is contained in:
22
tools/include/daemon.h
Normal file
22
tools/include/daemon.h
Normal file
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* include/daemon.h - Helper functions for proper daemonification
|
||||
*
|
||||
* Written 2011 by Werner Almesberger
|
||||
* Copyright 2011 Werner Almesberger
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef DAEMON_H
|
||||
#define DAEMON_H
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
|
||||
pid_t daemonize(void);
|
||||
|
||||
#endif /* !DAEMON_H */
|
||||
Reference in New Issue
Block a user