child mcexec don't print signal terminate message
This commit is contained in:
@ -116,6 +116,7 @@ int main_loop(int fd, int cpu, pthread_mutex_t *lock);
|
|||||||
static int fd;
|
static int fd;
|
||||||
static char *altroot;
|
static char *altroot;
|
||||||
static const char rlimit_stack_envname[] = "MCKERNEL_RLIMIT_STACK";
|
static const char rlimit_stack_envname[] = "MCKERNEL_RLIMIT_STACK";
|
||||||
|
static int ischild;
|
||||||
|
|
||||||
pid_t gettid(void)
|
pid_t gettid(void)
|
||||||
{
|
{
|
||||||
@ -1106,8 +1107,10 @@ int main_loop(int fd, int cpu, pthread_mutex_t *lock)
|
|||||||
sig = w.sr.args[0] & 0x7f;
|
sig = w.sr.args[0] & 0x7f;
|
||||||
term = (w.sr.args[0] & 0xff00) >> 8;
|
term = (w.sr.args[0] & 0xff00) >> 8;
|
||||||
if(isatty(2)){
|
if(isatty(2)){
|
||||||
if(sig)
|
if(sig){
|
||||||
fprintf(stderr, "Terminate by signal %d\n", sig);
|
if(!ischild)
|
||||||
|
fprintf(stderr, "Terminate by signal %d\n", sig);
|
||||||
|
}
|
||||||
else if(term)
|
else if(term)
|
||||||
__dprintf("Exit status: %d\n", term);
|
__dprintf("Exit status: %d\n", term);
|
||||||
}
|
}
|
||||||
@ -1163,6 +1166,7 @@ int main_loop(int fd, int cpu, pthread_mutex_t *lock)
|
|||||||
case 0: {
|
case 0: {
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
ischild = 1;
|
||||||
/* Reopen device fd */
|
/* Reopen device fd */
|
||||||
close(fd);
|
close(fd);
|
||||||
fd = open(dev, O_RDWR);
|
fd = open(dev, O_RDWR);
|
||||||
|
|||||||
Reference in New Issue
Block a user