alarm: make alarm work for processes running as none
This commit is contained in:
parent
88ef1b67b0
commit
532ac0ec66
1 changed files with 3 additions and 4 deletions
|
@ -24,8 +24,6 @@
|
|||
#include <u.h>
|
||||
#include <libc.h>
|
||||
|
||||
int cpid;
|
||||
|
||||
void
|
||||
usage(void)
|
||||
{
|
||||
|
@ -36,7 +34,7 @@ usage(void)
|
|||
static void
|
||||
catch(void *, char *msg)
|
||||
{
|
||||
postnote(PNGROUP, cpid, msg);
|
||||
postnote(PNGROUP, getpid(), msg);
|
||||
noted(NDFLT);
|
||||
}
|
||||
|
||||
|
@ -71,7 +69,8 @@ main(int argc, char *argv[])
|
|||
}
|
||||
t += n;
|
||||
}
|
||||
switch((cpid = rfork(RFFDG|RFREND|RFPROC|RFMEM|RFNOTEG))){
|
||||
rfork(RFNOTEG);
|
||||
switch(rfork(RFFDG|RFREND|RFPROC|RFMEM)){
|
||||
case -1:
|
||||
sysfatal("%r");
|
||||
case 0: /* child */
|
||||
|
|
Loading…
Reference in a new issue