NetBSD Problem Report #51861

From www@NetBSD.org  Fri Jan 13 07:02:46 2017
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 1C2437A264
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 13 Jan 2017 07:02:46 +0000 (UTC)
Message-Id: <20170113070245.41DE47A280@mollari.NetBSD.org>
Date: Fri, 13 Jan 2017 07:02:45 +0000 (UTC)
From: yaneurabeya@gmail.com
Reply-To: yaneurabeya@gmail.com
To: gnats-bugs@NetBSD.org
Subject: [PATCH] tests/lib/libc/sys/t_select: various fixes
X-Send-Pr-Version: www-1.0

>Number:         51861
>Category:       bin
>Synopsis:       [PATCH] tests/lib/libc/sys/t_select: various fixes
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jan 13 07:05:01 +0000 2017
>Closed-Date:    Sun Jan 15 20:02:31 +0000 2017
>Last-Modified:  Sun Jan 15 20:02:31 +0000 2017
>Originator:     Ngie Cooper
>Release:        7.0.2
>Organization:
>Environment:
n/a
>Description:
- Mark signo __unused for -Wunused compilation.
- Kill potential for runaway child process.
>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:
From: "Ngie Cooper (yaneurabeya)" <yaneurabeya@gmail.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: bin/51861: [PATCH] tests/lib/libc/sys/t_select: various fixes
Date: Thu, 12 Jan 2017 23:07:44 -0800

 --Apple-Mail=_6C5AD51E-11B4-4024-BD92-C87CC6AC8A34
 Content-Disposition: attachment;
 	filename=t_select-mark-signo-__unused-and-dont-permit-runaway-child.patch
 Content-Type: application/octet-stream;
 	x-unix-mode=0644;
 	name="t_select-mark-signo-__unused-and-dont-permit-runaway-child.patch"
 Content-Transfer-Encoding: 7bit

 Index: lib/libc/sys/t_select.c
 ===================================================================
 RCS file: /cvsroot/src/tests/lib/libc/sys/t_select.c,v
 retrieving revision 1.3
 diff -u -r1.3 t_select.c
 --- lib/libc/sys/t_select.c	18 Mar 2012 07:00:52 -0000	1.3
 +++ lib/libc/sys/t_select.c	13 Jan 2017 06:48:16 -0000
 @@ -47,13 +47,13 @@
  static sig_atomic_t keep_going = 1;

  static void
 -sig_handler(int signum)
 +sig_handler(int signum __unused)
  {
  	keep_going = 0;
  }

  static void
 -sigchld(int signum)
 +sigchld(int signum __unused)
  {
  }

 @@ -127,6 +127,7 @@
  		    "after timeout %s != %s",
  		    prmask(&nset, nbuf, sizeof(nbuf)),
  		    prmask(&oset, obuf, sizeof(obuf)));
 +	_exit(0);
  }

  ATF_TC(pselect_sigmask);
 @@ -146,6 +147,7 @@
  	switch (pid = fork()) {
  	case 0:
  		child(NULL);
 +		break;
  	case -1:
  		err(1, "fork");
  	default:

 --Apple-Mail=_6C5AD51E-11B4-4024-BD92-C87CC6AC8A34--

From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/51861 CVS commit: src/tests/lib/libc/sys
Date: Fri, 13 Jan 2017 16:18:33 -0500

 Module Name:	src
 Committed By:	christos
 Date:		Fri Jan 13 21:18:33 UTC 2017

 Modified Files:
 	src/tests/lib/libc/sys: t_select.c

 Log Message:
 PR/51861: Ngie Cooper: Sprinkle __unused, mark __dead, _exit().


 To generate a diff of this commit:
 cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/sys/t_select.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: snj@NetBSD.org
State-Changed-When: Sun, 15 Jan 2017 20:02:31 +0000
State-Changed-Why:
christos committed it (with one minor change). thanks!


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.