diff options
author | Dave Davenport <qball@gmpclient.org> | 2015-07-30 08:57:09 +0200 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2015-07-30 08:57:09 +0200 |
commit | 8d6a78939cd1a10870ad03fb82753617ce053040 (patch) | |
tree | df0a876112910957ee1cd1e2cfdb854759181e8c /include/helper.h | |
parent | 9167cffd27428c506b12afe8b1e7ae861d20fd1e (diff) |
Small cleanup + fail more gracefull here and there
Diffstat (limited to 'include/helper.h')
-rw-r--r-- | include/helper.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/helper.h b/include/helper.h index 4c34da2f..008964ae 100644 --- a/include/helper.h +++ b/include/helper.h @@ -121,9 +121,14 @@ int execute_generator ( const char * cmd ) __attribute__( ( nonnull ) ); /** * @param pidfile The pidfile to create. * - * Calls exit (1) when failed. + * returns file descriptor (or -1 when failed) */ -void create_pid_file ( const char *pidfile ); +int create_pid_file ( const char *pidfile ); + +/** + * Remove pid file + */ +void remove_pid_file ( int fd ); /** * Do some input validation, especially the first few could break things. |