From 4f17667d42e67218e1dab9605a4487d6f963b64c Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 2 Sep 2022 20:26:13 -0400 Subject: [PATCH] Changed setpgrp to a more portable form. --- src/api/process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/process.c b/src/api/process.c index 1be1286c..d713a84b 100644 --- a/src/api/process.c +++ b/src/api/process.c @@ -278,7 +278,7 @@ static int process_start(lua_State* L) { retval = luaL_error(L, "Error running fork: %s.", strerror(errno)); goto cleanup; } else if (!self->pid) { - setpgrp(); + setpgid(0,0); for (int stream = 0; stream < 3; ++stream) { if (new_fds[stream] == REDIRECT_DISCARD) { // Close the stream if we don't want it. close(self->child_pipes[stream][stream == STDIN_FD ? 0 : 1]);