Tiny patch: sigmask.diff - Mailing list pgsql-hackers

From Aleksander Alekseev
Subject Tiny patch: sigmask.diff
Date
Msg-id 20160404155656.428699d8@fujitsu
Whole thread Raw
Responses Re: Tiny patch: sigmask.diff  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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

pgsql-hackers by date:

Previous
From: David Steele
Date:
Subject: Re: Updated backup APIs for non-exclusive backups
Next
From: Masahiko Sawada
Date:
Subject: Re: Support for N synchronous standby servers - take 2