Re: [PATCH] sigaction.2: setitimer(2)/alarm(2) timers yield si_code=SI_TIMER too

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jul 09, 2024 at 10:42:24PM GMT, наб wrote:
> On Tue, Jul 09, 2024 at 09:47:22PM +0200, Alejandro Colomar wrote:
> > On Tue, Jul 09, 2024 at 09:36:34PM GMT, наб wrote:
> > > On Tue, Jul 09, 2024 at 09:20:28PM +0200, Alejandro Colomar wrote:
> > > > Anyway, for 2008, was it non-standard behavior?
> > > It wasn't "non-standard" so much as it was left up to the implementation
> > > (still is), except for timer_create().
> > > 
> > > All implementations agree here, so there's no point in splitting hair IMO
> > Okay.  Then, maybe, I'd remove the "Linux and NetBSD" bits from the
> > commit message, and just say something like all implementations do that?
> 
> Okay, wider implementation survey:
>          alarm     setitimer  timer_create
> Linux    SI_TIMER  SI_TIMER   SI_TIMER
> NetBSD   SI_TIMER  SI_TIMER   SI_TIMER
> FreeBSD  not       not        SI_TIMER
> illumos  not       not        SI_TIMER
> OpenBSD  not       not        N/A
> 
> (Well, OpenBSD doesn't have POSIX timers, so the value of comparing it
>  is questionable.)
> 
> I wouldn't call it a "Linux extension" because implementations are free
> to pick anything for setitimer and alarm signals (just like they are free
> to implement alarm in terms of setitimer).
> 
> But also clearly not all implementations do this.
> But also /some/ non-Linux ones do.
> 
> But also saying something happens "Under Linux" here is goofy,
> because these are linux man-pages.
> 
> Maybe NOTES: "POSIX only guarantees SI_TIMER for signals created by
> timer_create(2). Implementations are free to also provide it for other
> types of timers. The Linux behaviour matches NetBSD."?

LGTM.  Thanks for the research!

Cheers,
Alex

> 
> Best,



-- 
<https://www.alejandro-colomar.es/>

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux