Tiny patch: sigmask.diff

From: Aleksander Alekseev <a(dot)alekseev(at)postgrespro(dot)ru>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Tiny patch: sigmask.diff
Date: 2016-04-04 12:56:56
Message-ID: 20160404155656.428699d8@fujitsu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello

sigmask macro is defined in win32.h like this:

```
#define sigmask(sig) ( 1 << ((sig)-1) )
```

And used in signal.c in this fashion:

```
for (i = 0; i < PG_SIGNAL_COUNT; i++)
{
if (exec_mask & sigmask(i))
{
```

Thus during first iteration we are doing `<< -1`. I think it's a bug.

Patch attached.

--
Best regards,
Aleksander Alekseev
http://eax.me/

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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2016-04-04 13:00:24 Re: Support for N synchronous standby servers - take 2
Previous Message David Steele 2016-04-04 12:40:19 Re: Updated backup APIs for non-exclusive backups