Skip to content

Commit

Permalink
OpenBSD: it was not that, what the heck / 4
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasdr committed Jan 9, 2025
1 parent 0d045b0 commit 6efe5dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/minitscript/minitscript/ApplicationMethods.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,10 @@ void ApplicationMethods::registerMethods(MinitScript* minitScript) {
pid_t pid;
auto commandC = new char[command.size() + 1];
strcpy(commandC, command.c_str());
char *argv[] = {"/bin/sh", "-c", commandC, NULL};
char *argv[] = {"/bin/sh", "-c", commandC, nullptr};
//
auto exitCode = EXIT_FAILURE;
auto status = posix_spawn(&pid, "/bin/sh", NULL, NULL, argv, ::environ);
auto status = posix_spawn(&pid, "/bin/sh", nullptr, nullptr, argv, ::environ);
if (status == 0) {
do {
if (waitpid(pid, &status, 0) != -1) {
Expand Down

0 comments on commit 6efe5dc

Please sign in to comment.