From 827145558b50c18a8b486c39366c84c92e6786f2 Mon Sep 17 00:00:00 2001 From: Igor Sobrado Date: Tue, 28 Jan 2014 17:49:06 +0000 Subject: make description of gzip(1) exit status codes more accurate. issue pointed out by jmc@, verified by me. ok jmc@ --- usr.bin/compress/gzip.1 | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) (limited to 'usr.bin/compress') diff --git a/usr.bin/compress/gzip.1 b/usr.bin/compress/gzip.1 index e55c82a713f..191b0236a54 100644 --- a/usr.bin/compress/gzip.1 +++ b/usr.bin/compress/gzip.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: gzip.1,v 1.12 2014/01/28 14:18:28 jmc Exp $ +.\" $OpenBSD: gzip.1,v 1.13 2014/01/28 17:49:05 sobrado Exp $ .\" .\" Copyright (c) 1986, 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -314,12 +314,29 @@ automatically. .El .Sh EXIT STATUS The -.Nm gzip , -.Nm gunzip , +.Nm gzip +utility exits with one of the following values: +.Pp +.Bl -tag -width Ds -offset indent -compact +.It 0 +Success. +.It 1 +An error occurred. +.It 2 +At least one of the specified files was not compressed since +.Fl f +was not specified and compression would have resulted in a size +increase. +.It \*(Gt2 +An error occurred. +.El +.Pp +The +.Nm gunzip and .Nm gzcat -utilities exit with 0 on success; 1 if an error occurred; -or 2 if a warning occurred. +utilities exit 0 on success, +and >0 if an error occurs. .Sh SEE ALSO .Xr compress 1 , .Xr gzexe 1 , -- cgit v1.2.3