Re: Tiny patch: sigmask.diff

From: Aleksander Alekseev <a(dot)alekseev(at)postgrespro(dot)ru>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Tiny patch: sigmask.diff
Date: 2016-04-04 15:19:46
Message-ID: 20160404181946.4fc88bfe@fujitsu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

> Surely this fix is completely wrong? You'd have to touch every use of
> signum() to do it like that. You'd also be introducing similarly-
> undefined behavior at the other end of the loop, where this coding
> would be asking to compute 1<<31, hence shifting into the sign bit,
> which is undefined unless you make the computation explicitly
> unsigned.

Oh, I didn't think about that...

> I think better is just to change the for-loop to iterate from 1 not 0.
> Signal 0 is invalid anyway, and is rejected in pg_queue_signal for
> example, so there can't be any event waiting there.


Best regards,
Aleksander Alekseev

Attachment Content-Type Size
sigmask-v2.diff text/x-patch 477 bytes

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2016-04-04 15:21:15 Re: [PROPOSAL] Client Log Output Filtering
Previous Message David Steele 2016-04-04 15:17:11 Re: [PROPOSAL] Client Log Output Filtering