chiark / gitweb /
debianutils: Update from 4.8.3 to 4.8.4
[termux-packages] / packages / daemonize / daemonize.c.patch
1 diff -u -r ../daemonize-release-1.7.7/daemonize.c ./daemonize.c
2 --- ../daemonize-release-1.7.7/daemonize.c      2015-12-11 23:54:43.000000000 +0100
3 +++ ./daemonize.c       2017-07-07 00:33:39.931635851 +0200
4 @@ -24,6 +24,7 @@
5  #include <fcntl.h>
6  #include <sys/stat.h>
7  #include <sys/file.h>
8 +#include <grp.h> /* For initgroups(3). */
9  #include "config.h"
10  #include "version.h"
11  
12 @@ -38,7 +39,10 @@
13  static bool         be_verbose = FALSE;
14  static const char  *user       = NULL;
15  static char       **cmd        = NULL;
16 -static const char  *cwd        = "/";
17 +/* Termux patch: Use a readable directory for e.g. runsvdir to work,
18 +   as / is not readable starting from Android 7:
19 +   https://github.com/termux/termux-packages/issues/614 */
20 +static const char  *cwd        = "@TERMUX_PREFIX@";
21  static int          null_fd    = -1;
22  static int          out_fd     = -1;
23  static int          err_fd     = -1;