v1-0002-Consistently-use-exit-code-1-for-invalid-argument.patch
application/octet-stream
Filename: v1-0002-Consistently-use-exit-code-1-for-invalid-argument.patch
Type: application/octet-stream
Part: 1
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: format-patch
Series: patch v1-0002
Subject: Consistently use exit code 1 for invalid argument
| File | + | − |
|---|---|---|
| src/bin/pg_archivecleanup/pg_archivecleanup.c | 1 | 1 |
From 2d658d79e54de47d04f22d5128e0081b56cf9cc0 Mon Sep 17 00:00:00 2001
From: Daniel Gustafsson <dgustafsson@postgresql.org>
Date: Thu, 18 Sep 2025 15:04:28 +0200
Subject: [PATCH v1 2/2] Consistently use exit code 1 for invalid argument
When terminating an application due to an invalid command-line
argument we always use exit code 1.
Author: Daniel Gustafsson <daniel@yesql.se>
Reviewed-by: ..
Discussion: ..
---
src/bin/pg_archivecleanup/pg_archivecleanup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index 700c06a3f44..328fa028876 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -336,7 +336,7 @@ main(int argc, char **argv)
default:
/* getopt already emitted a complaint */
pg_log_error_hint("Try \"%s --help\" for more information.", progname);
- exit(2);
+ exit(1);
}
}
--
2.39.3 (Apple Git-146)