mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-23 04:54:26 +00:00
Revert "Perform execv in a forked child process, waiting on the original to exit to allow resources to be released."
This reverts commit b0fa94d52a26cde776e566bb04c809b3b9f18de4. Loses control of the terminal.
This commit is contained in:
parent
2b78182445
commit
6fa32c9246
11
cgminer.c
11
cgminer.c
@ -2889,9 +2889,6 @@ static void clean_up(void);
|
||||
|
||||
void app_restart(void)
|
||||
{
|
||||
pid_t parent, child;
|
||||
int status;
|
||||
|
||||
applog(LOG_WARNING, "Attempting to restart %s", packagename);
|
||||
|
||||
__kill_work();
|
||||
@ -2904,15 +2901,7 @@ void app_restart(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
parent = getpid();
|
||||
child = fork();
|
||||
if (child) {
|
||||
applog(LOG_WARNING, "Shutting down original process");
|
||||
exit(0);
|
||||
}
|
||||
waitpid(parent, &status, 0);
|
||||
execv(initial_args[0], (EXECV_2ND_ARG_TYPE)initial_args);
|
||||
/* We shouldn't get here */
|
||||
applog(LOG_WARNING, "Failed to restart application");
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user