From owner-svn-src-all@FreeBSD.ORG Wed Jul 16 10:29:14 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C2343F64; Wed, 16 Jul 2014 10:29:14 +0000 (UTC) Received: from mail-we0-x232.google.com (mail-we0-x232.google.com [IPv6:2a00:1450:400c:c03::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DE7E327AF; Wed, 16 Jul 2014 10:29:13 +0000 (UTC) Received: by mail-we0-f178.google.com with SMTP id w61so687031wes.23 for ; Wed, 16 Jul 2014 03:29:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=rd7m764TmHahO85r0OhwXsvXNVwb18Of7/YI1M7RgKs=; b=fv9CrRX5yoETFCC4MIoIzhTYqywA6YAFMZdVDEQK8d0jLXQf6DZEZFNJsbsCMeOJhE SjKkNAEz/cTaumRG5fD8gG+Vl/EPsAjawJ6lB6ys+KvmrBIBP2wzkrroDP/jEOud6CV6 xnihjt7ydiYeQ9YOMoSQBS7l1PasUFYFwUlQOoJTuj/6KEXP/P/l0+Z+U4RuqrZ7iotq DQQEImNZiYcNET5iH2vgRnqH9QMmrGAblLKydgvLk5pWf5Vg9N0bSvk6ViJThlYGrQv7 hxZl06XVeZ1Y5EG1bNO/374LwhyHiSNO6PnPWUYHzEG+CJ7QnUEcxDqHsSK6VH8MbNU3 qxEg== X-Received: by 10.194.174.35 with SMTP id bp3mr33575505wjc.33.1405506551987; Wed, 16 Jul 2014 03:29:11 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPSA id dj2sm54878311wib.11.2014.07.16.03.29.10 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 16 Jul 2014 03:29:11 -0700 (PDT) Date: Wed, 16 Jul 2014 12:29:08 +0200 From: Mateusz Guzik To: Baptiste Daroussin Subject: Re: svn commit: r268745 - in head/usr.bin: . timeout Message-ID: <20140716102908.GA17076@dft-labs.eu> References: <201407160955.s6G9taro084054@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201407160955.s6G9taro084054@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jul 2014 10:29:14 -0000 On Wed, Jul 16, 2014 at 09:55:36AM +0000, Baptiste Daroussin wrote: > Author: bapt > Date: Wed Jul 16 09:55:36 2014 > New Revision: 268745 > URL: http://svnweb.freebsd.org/changeset/base/268745 > > Log: > New BSDL timeout(1) utility compatible with GNU timeout > > it fully passes the GNU timeout regression tests, it is written in a mostly > portable way (only signal parsing is relying on non portable structures) > > Phabric: D377 > > +static sig_atomic_t sig_chld = 0; > +static sig_atomic_t sig_term = 0; > +static sig_atomic_t sig_alrm = 0; > +static sig_atomic_t sig_ign = 0; > + No reason to se these explicitely to 0. > +static void > +usage(void) > +{ > + fprintf(stderr, "Usage: %s [--signal sig | -s sig] [--preserve-status]" > + " [--kill-after time | -k time] [--foreground] " > + " \n", getprogname()); > + Missing newline at the begnning. > + exit(EX_USAGE); > +} > + > + switch(signo) { > + case 0: sig 0? I doubt it is ever delivered. > + if (timedout && !preserve) > + pstat = EXIT_TIMEOUT; > + Bad indentation. > + return (pstat); > +} > -- Mateusz Guzik