We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a4bbf06 commit ca70447Copy full SHA for ca70447
opkrun.c
@@ -455,15 +455,14 @@ int main(int argc, char **argv)
455
execvp(args[0], args);
456
}
457
458
- FILE *fp = fopen("/var/run/funkey.pid", "w");
459
- if (fp != NULL) {
460
- fprintf(fp, "%d\n", son);
461
- fclose(fp);
462
- }
+ /* Record the PID into a file */
+ sprintf(command, "pid record %d", son);
+ system(command);
463
464
/* Wait for son pid to finish */
465
int status;
466
waitpid(son, &status, 0);
+ system("pid erase");
467
468
/* Move back to / folder */
469
chdir("/");
0 commit comments