X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fdaemonize.h;h=2c88f06b7ddaa1dd1ac9224997e220e0dda8f3cb;hp=bc64d769a9717ba0ababe16636d425b4f52d26ce;hb=HEAD;hpb=d5d516999a7f74b8906bd759533ba14fb40e5ae4 diff --git a/src/common/daemonize.h b/src/common/daemonize.h deleted file mode 100644 index bc64d769a..000000000 --- a/src/common/daemonize.h +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef LTTNG_DAEMONIZE_H -#define LTTNG_DAEMONIZE_H - -/* - * Copyright (C) 2013 - David Goulet - * Copyright (C) 2014 - Mathieu Desnoyers - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License, version 2 only, as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., 51 - * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#include -#include - -/* - * Daemonize this process by forking and making the parent wait for the child - * to signal it indicating readiness. Once received, the parent successfully - * quits. - * - * The child process undergoes the same action that daemon(3) does meaning - * setsid, chdir, and dup /dev/null into 0, 1 and 2. - * - * Return 0 on success else -1 on error. - */ -LTTNG_HIDDEN -int lttng_daemonize(pid_t *child_ppid, int *completion_flag, - int close_fds); - -#endif /* LTTNG_DAEMONIZE_H */