Jorrit's fixes after reviewing Al's PM chapter
This commit is contained in:
parent
dc55ba447d
commit
c1de7758b7
2 changed files with 4 additions and 5 deletions
|
@ -71,9 +71,9 @@ PUBLIC int do_fork()
|
||||||
child_nr = (int)(rmc - mproc); /* slot number of the child */
|
child_nr = (int)(rmc - mproc); /* slot number of the child */
|
||||||
procs_in_use++;
|
procs_in_use++;
|
||||||
*rmc = *rmp; /* copy parent's process slot to child's */
|
*rmc = *rmp; /* copy parent's process slot to child's */
|
||||||
|
|
||||||
rmc->mp_parent = who; /* record child's parent */
|
rmc->mp_parent = who; /* record child's parent */
|
||||||
rmc->mp_flags &= (IN_USE|SEPARATE); /* inherit only these flags */
|
/* inherit only these flags */
|
||||||
|
rmc->mp_flags &= (IN_USE|SEPARATE|PRIV_PROC|DONT_SWAP);
|
||||||
rmc->mp_child_utime = 0; /* reset administration */
|
rmc->mp_child_utime = 0; /* reset administration */
|
||||||
rmc->mp_child_stime = 0; /* reset administration */
|
rmc->mp_child_stime = 0; /* reset administration */
|
||||||
|
|
||||||
|
|
|
@ -256,13 +256,12 @@ sigset_t sig_map;
|
||||||
id = 0; break; /* broadcast to process group */
|
id = 0; break; /* broadcast to process group */
|
||||||
case SIGKILL:
|
case SIGKILL:
|
||||||
id = -1; break; /* broadcast to all except INIT */
|
id = -1; break; /* broadcast to all except INIT */
|
||||||
|
#if DEAD_CODE
|
||||||
case SIGALRM:
|
case SIGALRM:
|
||||||
/* Disregard SIGALRM when the target process has not
|
|
||||||
* requested an alarm.
|
|
||||||
*/
|
|
||||||
if ((rmp->mp_flags & ALARM_ON) == 0) continue;
|
if ((rmp->mp_flags & ALARM_ON) == 0) continue;
|
||||||
rmp->mp_flags &= ~ALARM_ON;
|
rmp->mp_flags &= ~ALARM_ON;
|
||||||
/* fall through */
|
/* fall through */
|
||||||
|
#endif
|
||||||
default:
|
default:
|
||||||
id = proc_id;
|
id = proc_id;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue