|
1 | | ---- ./entr.c 2021-07-02 20:20:26.000000000 +0530 |
2 | | -+++ ./entr.c.mod 2021-07-26 20:02:28.474638318 +0530 |
3 | | -@@ -183,10 +183,10 @@ |
| 1 | +--- a/entr.c |
| 2 | ++++ b/entr.c |
| 3 | +@@ -181,11 +181,11 @@ |
4 | 4 | fprintf(stderr, "open_max: %d\n", open_max); |
5 | 5 |
|
6 | 6 | /* prevent interactive utilities from paging output */ |
7 | 7 | - setenv("PAGER", "/bin/cat", 0); |
8 | 8 | + setenv("PAGER", "@TERMUX_PREFIX@/bin/cat", 0); |
9 | 9 |
|
10 | 10 | /* ensure a shell is available to use */ |
11 | | -- setenv("SHELL", "/bin/sh", 0); |
12 | | -+ setenv("SHELL", "@TERMUX_PREFIX@/bin/sh", 0); |
| 11 | + if ((shell = getenv("SHELL")) == NULL) |
| 12 | +- shell = "/bin/sh"; |
| 13 | ++ shell = "@TERMUX_PREFIX@/bin/sh"; |
| 14 | + shell_base = strdup(shell); |
| 15 | + shell_base = basename(shell_base); |
13 | 16 |
|
14 | | - /* sequential scan may depend on a 0 at the end */ |
15 | | - files = calloc(open_max+1, sizeof(WatchFile *)); |
| 17 | +@@ -571,7 +571,7 @@ |
| 18 | + new_argv = calloc(argc + 1, sizeof(char *)); |
| 19 | + if (new_argv == NULL) |
| 20 | + err(1, "calloc"); |
| 21 | +- new_argv[0] = "/bin/false"; |
| 22 | ++ new_argv[0] = "@TERMUX_PREFIX@/bin/false"; |
| 23 | + for (m = 0, i = 0, p = arg_buf; i < argc; i++) { |
| 24 | + remaining = ARG_MAX - (p - arg_buf); |
| 25 | + new_argv[i] = p; |
0 commit comments