From 047b334752113ce4ec2d70f9a88ba80d1cec5709 Mon Sep 17 00:00:00 2001 From: Nick Chan Date: Tue, 28 Mar 2023 20:43:19 +0800 Subject: [PATCH] changes --- src/exec_checkra1n.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/src/exec_checkra1n.c b/src/exec_checkra1n.c index c6b6592..f52bf3e 100644 --- a/src/exec_checkra1n.c +++ b/src/exec_checkra1n.c @@ -134,18 +134,25 @@ checkra1n_exec: {}; } else { strncat(args, "R", 0xf); } - if (pongo_path != NULL) { - setenv("CHECKRA1N_OVERRIDE_PONGO", pongo_path, 1); - } LOG(LOG_VERBOSE5, args); if (pongo_path != NULL) LOG(LOG_VERBOSE5, pongo_path); pid_t pid; - char* checkra1n_argv[] = { - checkra1n_path, - args, - NULL - }; - ret = posix_spawn(&pid, checkra1n_path, NULL, NULL, checkra1n_argv, environ); + if (pongo_path != NULL) { + ret = posix_spawn(&pid, checkra1n_path, NULL, NULL, (char* []){ + checkra1n_path, + args, + "-k", + pongo_path, + NULL + }, environ); + } else { + ret = posix_spawn(&pid, checkra1n_path, NULL, NULL, (char* []){ + checkra1n_path, + args, + NULL + }, environ); + } + waitpid(pid, NULL, 0); if (!external_pongo && pongo_path != NULL) { unlink(pongo_path);