From: David van Moolenbroek Date: Wed, 13 May 2009 21:58:10 +0000 (+0000) Subject: Clear trace bit for child on fork. X-Git-Tag: v3.1.4~33 X-Git-Url: http://zhaoyanbai.com/repos/?a=commitdiff_plain;h=c2aef85edabaf9009e9cd9f7d0ad4fcaba07c49f;p=minix.git Clear trace bit for child on fork. Without this, a forking single-stepped process will have its child die from a TRAP signal right away. --- diff --git a/kernel/system/do_fork.c b/kernel/system/do_fork.c index 7e6b30388..a365ab77a 100644 --- a/kernel/system/do_fork.c +++ b/kernel/system/do_fork.c @@ -55,6 +55,8 @@ register message *m_ptr; /* pointer to request message */ rpc->p_user_time = 0; /* set all the accounting times to 0 */ rpc->p_sys_time = 0; + rpc->p_reg.psw &= ~TRACEBIT; /* clear trace bit */ + /* Parent and child have to share the quantum that the forked process had, * so that queued processes do not have to wait longer because of the fork. * If the time left is odd, the child gets an extra tick.