diff options
| author | Klaatu <[email protected]> | 2016-05-02 16:02:00 +1200 |
|---|---|---|
| committer | Klaatu <[email protected]> | 2016-05-02 16:02:00 +1200 |
| commit | 614c5f64e01c6f820319e951177549f61b82d62b (patch) | |
| tree | 77b9e08eca04563c6d543c0f6f5d8309dcc2bcd2 /shutdown.c | |
| parent | 86f0721bd904d8163c5f8f2472b78169146cc67d (diff) | |
Diffstat (limited to 'shutdown.c')
| -rw-r--r-- | shutdown.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -40,13 +40,16 @@ static void exec_cmd(char *cmd, ...) { const char *s; va_list a; pid_t pid; + int count_args = 0; *arg++ = cmd; + count_args++; va_start(a,cmd); do { s=va_arg(a,const char*); *arg++ = (char *)s; - } while (s); + count_args++; + } while (s && count_args < 25); while ((pid = fork()) < 0) nano_sleep(0,500000000); if (pid == 0) { |
