138a34c9349267c99ce1ddbd0b6e985147415d355Dmitry V. Levin#!/bin/gawk 238a34c9349267c99ce1ddbd0b6e985147415d355Dmitry V. Levin# 338a34c9349267c99ce1ddbd0b6e985147415d355Dmitry V. Levin# Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org> 438a34c9349267c99ce1ddbd0b6e985147415d355Dmitry V. Levin# All rights reserved. 538a34c9349267c99ce1ddbd0b6e985147415d355Dmitry V. Levin# 638a34c9349267c99ce1ddbd0b6e985147415d355Dmitry V. Levin# Redistribution and use in source and binary forms, with or without 738a34c9349267c99ce1ddbd0b6e985147415d355Dmitry V. Levin# modification, are permitted provided that the following conditions 838a34c9349267c99ce1ddbd0b6e985147415d355Dmitry V. Levin# are met: 938a34c9349267c99ce1ddbd0b6e985147415d355Dmitry V. Levin# 1. Redistributions of source code must retain the above copyright 1038a34c9349267c99ce1ddbd0b6e985147415d355Dmitry V. Levin# notice, this list of conditions and the following disclaimer. 1138a34c9349267c99ce1ddbd0b6e985147415d355Dmitry V. Levin# 2. Redistributions in binary form must reproduce the above copyright 1238a34c9349267c99ce1ddbd0b6e985147415d355Dmitry V. Levin# notice, this list of conditions and the following disclaimer in the 1338a34c9349267c99ce1ddbd0b6e985147415d355Dmitry V. Levin# documentation and/or other materials provided with the distribution. 1438a34c9349267c99ce1ddbd0b6e985147415d355Dmitry V. Levin# 3. The name of the author may not be used to endorse or promote products 1538a34c9349267c99ce1ddbd0b6e985147415d355Dmitry V. Levin# derived from this software without specific prior written permission. 1638a34c9349267c99ce1ddbd0b6e985147415d355Dmitry V. Levin# 1738a34c9349267c99ce1ddbd0b6e985147415d355Dmitry V. Levin# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 1838a34c9349267c99ce1ddbd0b6e985147415d355Dmitry V. Levin# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 1938a34c9349267c99ce1ddbd0b6e985147415d355Dmitry V. Levin# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 2038a34c9349267c99ce1ddbd0b6e985147415d355Dmitry V. Levin# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 2138a34c9349267c99ce1ddbd0b6e985147415d355Dmitry V. Levin# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 2238a34c9349267c99ce1ddbd0b6e985147415d355Dmitry V. Levin# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2338a34c9349267c99ce1ddbd0b6e985147415d355Dmitry V. Levin# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2438a34c9349267c99ce1ddbd0b6e985147415d355Dmitry V. Levin# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2538a34c9349267c99ce1ddbd0b6e985147415d355Dmitry V. Levin# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 2638a34c9349267c99ce1ddbd0b6e985147415d355Dmitry V. Levin# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2738a34c9349267c99ce1ddbd0b6e985147415d355Dmitry V. Levin 2838593e942ad4b16b2c3c43ea521167368771cbfbDmitry V. LevinBEGIN { 29226bf1c21b8f04f7fa1655979fe00adee1e68b5eDmitry V. Levin n1[1] = "SIG_IGN, \\[HUP INT\\], SA_RESTORER\\|SA_RESTART, 0x[0-9a-f]+" 30226bf1c21b8f04f7fa1655979fe00adee1e68b5eDmitry V. Levin n2[1] = "SIG_IGN, \\[HUP INT\\], SA_RESTART" 3138593e942ad4b16b2c3c43ea521167368771cbfbDmitry V. Levin 32226bf1c21b8f04f7fa1655979fe00adee1e68b5eDmitry V. Levin n1[2] = "0x[0-9a-f]+, \\[QUIT TERM\\], SA_RESTORER\\|SA_SIGINFO, 0x[0-9a-f]+" 33226bf1c21b8f04f7fa1655979fe00adee1e68b5eDmitry V. Levin n2[2] = "0x[0-9a-f]+, \\[QUIT TERM\\], SA_SIGINFO" 3466a15a5bb832032591e57a4fc2c6ec70bce0732aDmitry V. Levin 35226bf1c21b8f04f7fa1655979fe00adee1e68b5eDmitry V. Levin n1[3] = "SIG_DFL, \\[\\], SA_RESTORER, 0x[0-9a-f]+" 36226bf1c21b8f04f7fa1655979fe00adee1e68b5eDmitry V. Levin n2[3] = "SIG_DFL, \\[\\], 0" 3766a15a5bb832032591e57a4fc2c6ec70bce0732aDmitry V. Levin 38226bf1c21b8f04f7fa1655979fe00adee1e68b5eDmitry V. Levin n1[4] = "SIG_DFL, ~\\[HUP( ((RT|SIGRT)[^] ]+|[3-9][0-9]|1[0-9][0-9]))*\\], SA_RESTORER, 0x[0-9a-f]+" 39226bf1c21b8f04f7fa1655979fe00adee1e68b5eDmitry V. Levin n2[4] = "SIG_DFL, ~\\[HUP( ((RT|SIGRT)[^] ]+|[3-9][0-9]|1[0-9][0-9]))*\\], 0" 4066a15a5bb832032591e57a4fc2c6ec70bce0732aDmitry V. Levin 41226bf1c21b8f04f7fa1655979fe00adee1e68b5eDmitry V. Levin o1[1] = o2[1] = "SIG_DFL, \\[\\], 0" 4238593e942ad4b16b2c3c43ea521167368771cbfbDmitry V. Levin 43226bf1c21b8f04f7fa1655979fe00adee1e68b5eDmitry V. Levin for (i = 2; i < 5; i++) { 44226bf1c21b8f04f7fa1655979fe00adee1e68b5eDmitry V. Levin o1[i] = n1[i - 1] 45226bf1c21b8f04f7fa1655979fe00adee1e68b5eDmitry V. Levin o2[i] = n2[i - 1] 46226bf1c21b8f04f7fa1655979fe00adee1e68b5eDmitry V. Levin } 4766a15a5bb832032591e57a4fc2c6ec70bce0732aDmitry V. Levin 48226bf1c21b8f04f7fa1655979fe00adee1e68b5eDmitry V. Levin a1 = "(0x[0-9a-f]+, )?(4|8|16)" 49226bf1c21b8f04f7fa1655979fe00adee1e68b5eDmitry V. Levin a2 = "(4|8|16)(, 0x[0-9a-f]+)?" 50226bf1c21b8f04f7fa1655979fe00adee1e68b5eDmitry V. Levin a3 = "0x[0-9a-f]+, (4|8|16)" 51b0c2a9dd5db760d2f5125604affcecd9ede24f9dDmitry V. Levin 52226bf1c21b8f04f7fa1655979fe00adee1e68b5eDmitry V. Levin for (i = 1; i < 5; i++) { 53226bf1c21b8f04f7fa1655979fe00adee1e68b5eDmitry V. Levin r[i] = "^rt_sigaction\\(SIGUSR2, (" \ 54226bf1c21b8f04f7fa1655979fe00adee1e68b5eDmitry V. Levin "\\{" n1[i] "\\}, \\{" o1[i] "\\}, " a1 "|" \ 55226bf1c21b8f04f7fa1655979fe00adee1e68b5eDmitry V. Levin "\\{" n2[i] "\\}, \\{" o2[i] "\\}, " a2 "|" \ 56226bf1c21b8f04f7fa1655979fe00adee1e68b5eDmitry V. Levin "\\{" n2[i] "\\}, \\{" o2[i] "\\}, " a3 ")\\) = 0$" 57226bf1c21b8f04f7fa1655979fe00adee1e68b5eDmitry V. Levin } 58226bf1c21b8f04f7fa1655979fe00adee1e68b5eDmitry V. Levin s[5] = "+++ exited with 0 +++" 59226bf1c21b8f04f7fa1655979fe00adee1e68b5eDmitry V. Levin 60226bf1c21b8f04f7fa1655979fe00adee1e68b5eDmitry V. Levin lines = 5 61226bf1c21b8f04f7fa1655979fe00adee1e68b5eDmitry V. Levin fail = 0 62b0c2a9dd5db760d2f5125604affcecd9ede24f9dDmitry V. Levin} 63226bf1c21b8f04f7fa1655979fe00adee1e68b5eDmitry V. Levin 64226bf1c21b8f04f7fa1655979fe00adee1e68b5eDmitry V. Levin@include "match.awk" 65