lkml.org 
[lkml]   [2005]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Patch to disarm timers after an exec syscall
Gernot Payer <gpayer@suse.de> wrote:
>
> 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.
>
> I don't think this patch breaks anything, as relying on this (undocumented)
> behaviour would imho be bad style.
>
> So tell me what you think, and if you have some pointers to interesting
> discussions about Linux and POSIX compliance then I would like to read that
> as well.
>
> --- linux-2.6.12.1-orig/fs/exec.c 2005-06-29 14:29:31.069738264 +0200
> +++ linux-2.6.12.1/fs/exec.c 2005-06-29 14:34:46.034856288 +0200
> @@ -1200,6 +1200,10 @@
> acct_update_integrals(current);
> update_mem_hiwater(current);
> kfree(bprm);
> +
> + /* delete old itimers */
> + exit_itimers(current->signal);
> +
> return retval;
> }

Ouch. What does 2.4.x do?

It wouldn't surprise me if fixing this breaks _something_ out there. We
might have to remain non-POSIX-compliant for the rest of time.

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

\
 
 \ /
  Last update: 2005-06-29 20:19    [W:0.707 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site