CVS commit: src/usr.bin/timeout

2016-10-13 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Thu Oct 13 06:22:26 UTC 2016

Modified Files:
src/usr.bin/timeout: timeout.1

Log Message:
typo


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/timeout/timeout.1

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

Modified files:

Index: src/usr.bin/timeout/timeout.1
diff -u src/usr.bin/timeout/timeout.1:1.3 src/usr.bin/timeout/timeout.1:1.4
--- src/usr.bin/timeout/timeout.1:1.3	Sat Aug  2 06:20:56 2014
+++ src/usr.bin/timeout/timeout.1	Thu Oct 13 06:22:26 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: timeout.1,v 1.3 2014/08/02 06:20:56 wiz Exp $
+.\"	$NetBSD: timeout.1,v 1.4 2016/10/13 06:22:26 dholland Exp $
 .\"
 .\" Copyright (c) 2014 Baptiste Daroussin 
 .\" All rights reserved.
@@ -53,7 +53,7 @@ is still running after
 .Ar duration ,
 it is killed.
 By default,
-.Dv SIGTERM .
+.Dv SIGTERM
 is sent.
 .Bl -tag -width "-k time, --kill-after time"
 .It Fl Fl preserve-status
@@ -67,7 +67,7 @@ children.
 .It Fl s Ar sig , Fl Fl signal Ar sig
 Specify the signal to send on timeout.
 By default,
-.Dv SIGTERM .
+.Dv SIGTERM
 is sent.
 .It Fl k Ar time , Fl Fl kill-after Ar time
 Send a second kill signal if



CVS commit: src/usr.bin/timeout

2014-08-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Aug  5 08:20:02 UTC 2014

Modified Files:
src/usr.bin/timeout: timeout.c

Log Message:
Fix overflow check. From Kamil Rytarowski.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/timeout/timeout.c

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

Modified files:

Index: src/usr.bin/timeout/timeout.c
diff -u src/usr.bin/timeout/timeout.c:1.3 src/usr.bin/timeout/timeout.c:1.4
--- src/usr.bin/timeout/timeout.c:1.3	Sat Aug  2 05:16:22 2014
+++ src/usr.bin/timeout/timeout.c	Tue Aug  5 04:20:02 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: timeout.c,v 1.3 2014/08/02 09:16:22 martin Exp $ */
+/* $NetBSD: timeout.c,v 1.4 2014/08/05 08:20:02 christos Exp $ */
 
 /*-
  * Copyright (c) 2014 Baptiste Daroussin b...@freebsd.org
@@ -32,7 +32,7 @@
 #if 0
 __FBSDID($FreeBSD: head/usr.bin/timeout/timeout.c 268763 2014-07-16 13:52:05Z bapt $);
 #else
-__RCSID($NetBSD: timeout.c,v 1.3 2014/08/02 09:16:22 martin Exp $);
+__RCSID($NetBSD: timeout.c,v 1.4 2014/08/05 08:20:02 christos Exp $);
 #endif
 #endif /* not lint */
 
@@ -130,7 +130,7 @@ parse_signal(const char *str)
 
 	if (str[0] == '\0' || *ep != '\0')
 		goto err;
-	if (errno == ERANGE  (sig == INT_MAX || sig == INT_MIN))
+	if (errno == ERANGE  (sig == LONG_MAX || sig == LONG_MIN))
 		goto err;
 	if (sig = sys_nsig || sig  0)
 		goto err;



CVS commit: src/usr.bin/timeout

2014-08-02 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Aug  2 06:20:56 UTC 2014

Modified Files:
src/usr.bin/timeout: timeout.1

Log Message:
Punctuation, markup, whitespace improvements.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/timeout/timeout.1

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

Modified files:

Index: src/usr.bin/timeout/timeout.1
diff -u src/usr.bin/timeout/timeout.1:1.2 src/usr.bin/timeout/timeout.1:1.3
--- src/usr.bin/timeout/timeout.1:1.2	Fri Aug  1 14:01:30 2014
+++ src/usr.bin/timeout/timeout.1	Sat Aug  2 06:20:56 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: timeout.1,v 1.2 2014/08/01 14:01:30 christos Exp $
+.\	$NetBSD: timeout.1,v 1.3 2014/08/02 06:20:56 wiz Exp $
 .\
 .\ Copyright (c) 2014 Baptiste Daroussin b...@freebsd.org
 .\ All rights reserved.
@@ -34,10 +34,10 @@
 .Nd run a command with a time limit
 .Sh SYNOPSIS
 .Nm
-.Op Fl -signal Ar sig | Fl s Ar sig
-.Op Fl -preserve-status
-.Op Fl -kill-after Ar time | Fl k Ar time
-.Op Fl -foreground
+.Op Fl Fl signal Ar sig | Fl s Ar sig
+.Op Fl Fl preserve-status
+.Op Fl Fl kill-after Ar time | Fl k Ar time
+.Op Fl Fl foreground
 .Ao Ar duration Ac
 .Ao Ar command Ac
 .Ao Ar args ... Ac
@@ -46,30 +46,30 @@
 starts the
 .Ar command
 with its
-.Ar args.
+.Ar args .
 If
 .Ar command
 is still running after
 .Ar duration ,
 it is killed.
 By default,
-.Ar SIGTERM.
+.Dv SIGTERM .
 is sent.
 .Bl -tag -width -k time, --kill-after time
-.It Fl -preserve-status
+.It Fl Fl preserve-status
 Always exits with the same status as
 .Ar command
 even if it times out.
-.It Fl -foreground
+.It Fl Fl foreground
 Do not propagate timeout to the
 .Ar command
 children.
-.It Fl s Ar sig , Fl -signal Ar sig
+.It Fl s Ar sig , Fl Fl signal Ar sig
 Specify the signal to send on timeout.
 By default,
-.Ar SIGTERM .
+.Dv SIGTERM .
 is sent.
-.It Fl k Ar time , Fl -kill-after Ar time
+.It Fl k Ar time , Fl Fl kill-after Ar time
 Send a second kill signal if
 .Ar command
 is still running after
@@ -100,12 +100,12 @@ If the timeout was not reached, the exit
 is returned.
 .Pp
 If the timeout was reached and
-.Fl -preserve-status
+.Fl Fl preserve-status
 is set, the exit status of
 .Ar command
 is returned.
 If
-.Fl -preserve-status
+.Fl Fl preserve-status
 is not set, an exit status of 124 is returned.
 .Pp
 If
@@ -124,7 +124,10 @@ and was imported into
 The
 .Fx
 work is compatible with GNU
-.Xr timeout 1
-by Padraig Brady, from GNU Coreutils 8.21. The
-.Xr timeout 1
+.Nm
+by
+.An Padraig Brady ,
+from GNU Coreutils 8.21.
+The
+.Nm
 utility first appeared in GNU Coreutils 7.0.



CVS commit: src/usr.bin/timeout

2014-08-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Aug  2 09:16:22 UTC 2014

Modified Files:
src/usr.bin/timeout: timeout.c

Log Message:
Cast signal argument of kill(2) to int, as sig_atomic_t may be larger.
Avoids:
src/usr.bin/timeout/timeout.c:331:5: error: conversion to 'int' from 
'sig_atomic_t' may alter its value [-Werror=conversion]
 kill(pid, sig_term);
 ^
warning from gcc 4.8


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/timeout/timeout.c

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

Modified files:

Index: src/usr.bin/timeout/timeout.c
diff -u src/usr.bin/timeout/timeout.c:1.2 src/usr.bin/timeout/timeout.c:1.3
--- src/usr.bin/timeout/timeout.c:1.2	Fri Aug  1 14:01:30 2014
+++ src/usr.bin/timeout/timeout.c	Sat Aug  2 09:16:22 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: timeout.c,v 1.2 2014/08/01 14:01:30 christos Exp $ */
+/* $NetBSD: timeout.c,v 1.3 2014/08/02 09:16:22 martin Exp $ */
 
 /*-
  * Copyright (c) 2014 Baptiste Daroussin b...@freebsd.org
@@ -32,7 +32,7 @@
 #if 0
 __FBSDID($FreeBSD: head/usr.bin/timeout/timeout.c 268763 2014-07-16 13:52:05Z bapt $);
 #else
-__RCSID($NetBSD: timeout.c,v 1.2 2014/08/01 14:01:30 christos Exp $);
+__RCSID($NetBSD: timeout.c,v 1.3 2014/08/02 09:16:22 martin Exp $);
 #endif
 #endif /* not lint */
 
@@ -328,7 +328,7 @@ main(int argc, char **argv)
 			if (!foreground)
 killpg(pgid, killsig);
 			else
-kill(pid, sig_term);
+kill(pid, (int)sig_term);
 
 			if (do_second_kill) {
 set_interval(second_kill);