cleanup for valgrind.

This commit is contained in:
barant committed 2024-12-23 11:16:15 -08:00
1 parent de55071aad
commit 3d246063e5
2 files changed
+5 -4

No files matched your search

+3 -2
View File
@@ -15,7 +15,9 @@ namespace jet {
if(!variableDefined("pgm"))
throw coreutils::Exception("pgm keyword must be specified.");
resolveKeyword("pgm");
argv[0] = variables["pgm"].c_str(); // TODO: Need to peel off the program name only and pass as argv[0].
for(ix = 0; ix <= 50; ++ix)
argv[ix] = NULL;
argv[0] = variables["pgm"].c_str(); // TODO: Need to peel off the program name only and pass as argv[0].
for(ix = 1; ix <= 50; ++ix) {
coreutils::MString arg("arg");
arg << ix;
@@ -25,7 +27,6 @@ namespace jet {
} else
break;
}
argv[ix] == NULL;
pipe(fdo);
pid = fork();
if(pid == 0) {