The interval timers (setitimer()) are not inherited by fork (I've checked
the SuS) so start the timer in the correct process otherwise this test will never timeout.
This commit is contained in:
parent
a07f7c8069
commit
9551b193fd
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ras2.c,v 1.8 2008/01/06 21:53:08 martin Exp $ */
|
||||
/* $NetBSD: ras2.c,v 1.9 2008/01/12 11:10:08 dsl Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2002 The NetBSD Foundation, Inc.
|
||||
|
@ -70,7 +70,6 @@ main(void)
|
|||
itv.it_interval.tv_usec = 0;
|
||||
itv.it_value.tv_sec = 10;
|
||||
itv.it_value.tv_usec = 0;
|
||||
setitimer(ITIMER_VIRTUAL, &itv, NULL);
|
||||
|
||||
if (rasctl(RAS_ADDR(main), RAS_SIZE(main), RAS_INSTALL) < 0) {
|
||||
if (errno == EOPNOTSUPP) {
|
||||
|
@ -84,6 +83,7 @@ main(void)
|
|||
wait(&rv);
|
||||
return WEXITSTATUS(rv);
|
||||
}
|
||||
setitimer(ITIMER_VIRTUAL, &itv, NULL);
|
||||
|
||||
RAS_START(main);
|
||||
count++;
|
||||
|
|
Loading…
Reference in New Issue