summaryrefslogtreecommitdiffstats
path: root/usr.bin/patch/patch.1
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2003-07-28 16:13:53 +0000
committermillert <millert@openbsd.org>2003-07-28 16:13:53 +0000
commitea13368aef8a5016385daaeab11142fd28040f0b (patch)
tree0217d02bb907dfdb9205c83277f8ead65e92a619 /usr.bin/patch/patch.1
parentallow gif(4) over ipsec: mark mbuf for transport mode SA, (diff)
downloadwireguard-openbsd-ea13368aef8a5016385daaeab11142fd28040f0b.tar.xz
wireguard-openbsd-ea13368aef8a5016385daaeab11142fd28040f0b.zip
Make patch(1) exit value match POSIX and be consistent with diff.
Comments and OK from otto@
Diffstat (limited to 'usr.bin/patch/patch.1')
-rw-r--r--usr.bin/patch/patch.117
1 files changed, 14 insertions, 3 deletions
diff --git a/usr.bin/patch/patch.1 b/usr.bin/patch/patch.1
index 8e4cd81571d..fd0a176cc05 100644
--- a/usr.bin/patch/patch.1
+++ b/usr.bin/patch/patch.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: patch.1,v 1.12 2003/07/25 02:12:45 millert Exp $
+.\" $OpenBSD: patch.1,v 1.13 2003/07/28 16:13:53 millert Exp $
.\" Copyright 1986, Larry Wall
.\"
.\" Redistribution and use in source and binary forms, with or without
@@ -481,14 +481,25 @@ indicates that there is unprocessed text in the patch file and that
is attempting to intuit whether there is a patch in that text and, if so,
what kind of patch it is.
.Pp
+The
.Nm
-will exit with a non-zero status if any reject files were created.
+utility exits with one of the following values:
+.Pp
+.Bl -tag -width Ds -compact -offset indent
+.It \&0
+Successful completion.
+.It \&1
+One or more lines were written to a reject file.
+.It \*[Gt]\&1
+An error occurred.
+.El
+.Pp
When applying a set of patches in a loop it behooves you to check this
exit status so you don't apply a later patch to a partially patched file.
.Sh SEE ALSO
.Xr diff 1
.Sh AUTHORS
-.An Larry Wall Aq larry@wall.org
+.An Larry Wall
with many other contributors.
.Sh CAVEATS
.Nm