From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 129071 invoked by alias); 20 Aug 2017 12:59:42 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 129052 invoked by uid 89); 20 Aug 2017 12:59:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-7.0 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=H*F:D*nl X-HELO: lb1-smtp-cloud7.xs4all.net Received: from lb1-smtp-cloud7.xs4all.net (HELO lb1-smtp-cloud7.xs4all.net) (194.109.24.24) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 20 Aug 2017 12:59:39 +0000 Received: from tmp.twQGFRXt2P ([83.162.234.136]) by smtp-cloud7.xs4all.net with ESMTPSA id jPpId3S7fAr7rjPpJdN0FT; Sun, 20 Aug 2017 14:59:37 +0200 Date: Sun, 20 Aug 2017 12:59:00 -0000 Message-ID: <46d2983f263cb1be122ad1c8f239c88c@smtp-cloud7.xs4all.net> From: Houder To: cygwin@cygwin.com Subject: Re: REVISITED: Signal delivered while blocked References: In-Reply-to: Content-Type: text/plain; charset=UTF-8; format=fixed User-Agent: mua.awk 0.99 X-CMAE-Envelope: MS4wfFeZqDuqGNAZOqtxUaxCq20l8LJV0KbAOlAbXPYl+7vVfexgjJq7Tlbt0/zKjHPQoNudZZkoqYswyThMhUnfetSOpABVvi7pu9po7KVMMwi5skGEvgQn UIfFFm73Se++Y39JT89hUrrOcI+A0+IDOTLWS/b4p7xJZ6YcwPtyyxrj/PPkEtIDXvtBuEIc9bumDw== X-IsSubscribed: yes X-SW-Source: 2017-08/txt/msg00178.txt.bz2 On Wed, 16 Aug 2017 23:22:31, Houder wrote: > > Hi, > > Please read this post first: > > https://cygwin.com/ml/cygwin/2017-08/msg00048.html > ( Signal delivered while blocked -- by Noah Misch, August 4th 2017 ) > > This post is not intended to "hijack" the post by Noah Misch; this post > only ships an alternative (i.e. revised) testcase for the one by provided > by Noah Misch. > > The alternative testcase in fact consists of 2 testcases (2 files): > > 1. sigprocmask-exclusion4.c > 2. sigprocmask-exclusion5.c Only for those interested ... I made a minor modification to the 2nd testcase (sigprocmask-exclusion5.c) (in order to get it theoretically correct). I modified the last part (bottom) of each handler. See below. On request, I will upload the files again. Regards, Henri ----- handler(): // old #if defined(option1) if (sigprocmask(SIG_SETMASK, &oset, NULL) != 0) // herstel perror("sigprocmask"); #else r = sigdelset(&set, SIGCHLD); if (r != 0) puts("retvalH1b"); if (sigprocmask(SIG_UNBLOCK, &set, NULL) != 0) // verwijder perror("sigprocmask"); // Cygwin: aborts, almost immediately #endif } handler(): // new #if defined(option1) if (sigprocmask(SIG_SETMASK, &oset, NULL) != 0) // herstel perror("sigprocmask"); #else { int rv = 0; if ( (rv = sigismember(&oset, SIGCHLD)) == -1) perror("sigismember"); // if the other signal was enabled at the beginning, enable it again if (rv == 0) { if (sigprocmask(SIG_UNBLOCK, &set, NULL) != 0) // verwijder perror("sigprocmask"); } } #endif } ----- handler2(): // old #if defined(option1) if (sigprocmask(SIG_SETMASK, &oset, NULL) != 0) // herstel perror("sigprocmask"); #else r = sigdelset(&set, SIGUSR1); if (r != 0) puts("retvalH2b"); if (sigprocmask(SIG_UNBLOCK, &set, NULL) != 0) // verwijder perror("sigprocmask"); #endif } handler2(): // new #if defined(option1) if (sigprocmask(SIG_SETMASK, &oset, NULL) != 0) // herstel perror("sigprocmask"); #else { int rv = 0; if ( (rv = sigismember(&oset, SIGUSR1)) == -1) perror("sigismember"); // if the other signal was enabled at the beginning, enable it again if (rv == 0) { if (sigprocmask(SIG_UNBLOCK, &set, NULL) != 0) // verwijder perror("sigprocmask"); } } #endif } ===== -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple