when mcexec is killed by SIGKILL, terminate mckernel process (BUG#259)
This commit is contained in:
@ -1530,6 +1530,7 @@ int main_loop(int fd, int cpu, pthread_mutex_t *lock, int mcosid)
|
||||
case 0: {
|
||||
int i;
|
||||
int ret = 1;
|
||||
struct newprocess_desc npdesc;
|
||||
|
||||
ischild = 1;
|
||||
/* Reopen device fd */
|
||||
@ -1572,6 +1573,9 @@ fork_child_out:
|
||||
close(sync_pipe_fd[0]);
|
||||
close(sync_pipe_fd[1]);
|
||||
|
||||
npdesc.pid = getpid();
|
||||
ioctl(fd, MCEXEC_UP_NEW_PROCESS, &npdesc);
|
||||
|
||||
/* TODO: does the forked thread run in a pthread context? */
|
||||
for (i = 0; i <= ncpu; ++i) {
|
||||
pthread_join(thread_data[i].thread_id, NULL);
|
||||
|
||||
Reference in New Issue
Block a user