From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 19 05:09:24 2010 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6763106566B for ; Mon, 19 Jul 2010 05:09:24 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 713078FC17 for ; Mon, 19 Jul 2010 05:09:24 +0000 (UTC) Received: by iwn35 with SMTP id 35so5311468iwn.13 for ; Sun, 18 Jul 2010 22:09:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:cc:content-type; bh=4ThkaUcz/EEiWPhClTmRGggOj0bLipQX98kpJglp3OQ=; b=UZBRmH1koSQUAXjUoZlBDbPcDyutTNKwFsQCJAin2+iT/C1o2C85v/i2PVRKsHhKZf kn0PgyLjRCEER3KCNHmGSjkSRS5G5Tqn4SDhCb8BgABB+jqqmpLmsChwFhYXoZuqWMBT j8H/qbPE80FVFne3jzl3ePtSxC+SpDy+Bru9c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=HpbAWfFh1MtRA6HHzB/72/9opxnXKq4PSwz0W/uKJE6mZAEkhRdedN6JmpyXMPMhEv OR4YIuYIlElfYvGZYAisqh8Ha7GHBhrwLSn2qTS09iab1ChLvO96tbUKQjj3e2oD6YvX dARzxxbaA2HR+J7QV86LxlPBH+7MGK6PDhHU0= MIME-Version: 1.0 Received: by 10.231.148.83 with SMTP id o19mr5201523ibv.112.1279516163431; Sun, 18 Jul 2010 22:09:23 -0700 (PDT) Received: by 10.231.169.18 with HTTP; Sun, 18 Jul 2010 22:09:23 -0700 (PDT) Date: Sun, 18 Jul 2010 22:09:23 -0700 Message-ID: From: Garrett Cooper To: Kostik Belousov Content-Type: text/plain; charset=ISO-8859-1 Cc: hackers@freebsd.org Subject: [PATCH] Catch errors with sigaddset(3) in sigaddset (sigrelse) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 05:09:24 -0000 sigrelse has the same problem as (*sigset) as far as not catching sigaddset(3) errors is concerned. Thanks, -Garrett Index: compat-43/sigcompat.c =================================================================== --- compat-43/sigcompat.c (revision 210226) +++ compat-43/sigcompat.c (working copy) @@ -151,7 +151,8 @@ sigset_t set; sigemptyset(&set); - sigaddset(&set, sig); + if (sigaddset(&set, sig) == -1) + return (-1); return (_sigprocmask(SIG_UNBLOCK, &set, NULL)); }