| 1 | /* |
| 2 | * This file is part of secnet. |
| 3 | * See README for full list of copyright holders. |
| 4 | * |
| 5 | * secnet is free software; you can redistribute it and/or modify it |
| 6 | * under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation; either version 3 of the License, or |
| 8 | * (at your option) any later version. |
| 9 | * |
| 10 | * secnet is distributed in the hope that it will be useful, but |
| 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | * General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * version 3 along with secnet; if not, see |
| 17 | * https://www.gnu.org/licenses/gpl.html. |
| 18 | */ |
| 19 | |
| 20 | #ifndef process_h |
| 21 | #define process_h |
| 22 | |
| 23 | #include <signal.h> |
| 24 | #include <sys/wait.h> |
| 25 | |
| 26 | typedef void process_callback_fn(void *cst, pid_t pid, int status); |
| 27 | typedef void process_entry_fn(void *cst); |
| 28 | typedef void signal_notify_fn(void *cst, int signum); |
| 29 | |
| 30 | extern pid_t makesubproc(process_entry_fn *entry, process_callback_fn *cb, |
| 31 | void *est, void *cbst, cstring_t desc); |
| 32 | |
| 33 | extern void request_signal_notification(int signum, signal_notify_fn *notify, |
| 34 | void *cst); |
| 35 | |
| 36 | #endif /* process_h */ |