Re: Patch to disarm timers after an exec syscall

From: Chris Wright
Date: Wed Jun 29 2005 - 13:29:59 EST


* Gernot Payer (gpayer@xxxxxxx) wrote:
> Hi all,
>
> while running the openposix testsuite I saw testcase timer_create/9-1.c
> failing. This testcase tests whether timers are disarmed when a process calls
> exec, as described in e.g.
> http://www.opengroup.org/onlinepubs/009695399/functions/timer_create.html.

>
> The attached one-liner patch (+ one line comment) fixes this issue. I did the
> diff against 2.6.12.1, but the fix is pretty much the same for every other
> 2.6.x kernel I had a look at.

No, this can't do. It conflicts with the other bit of requirements.
Specifically:
http://www.opengroup.org/onlinepubs/009695399/functions/exec.html

As you mention:

[TMR] Per-process timers created by the calling process
shall be deleted before replacing the current process image with the new
process image.

But also:

The new process shall inherit at least the following attributes from the
calling process image:
<snip>
o [XSI] Interval timers

And this kills the latter.

thanks,
-chris
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/