aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-10-31 12:42:45 +0100
committerThomas Voss <mail@thomasvoss.com> 2024-10-31 12:42:45 +0100
commit3f866cec7095cd80307ff0f5203538b49f43cf3f (patch)
treeac8f071f1ae2e2705e6958da8810996136629025 /src
parent87b3bc8c4015222b463e713f9b68daebb95515c9 (diff)
Add another pledge(2) location
Diffstat (limited to 'src')
-rw-r--r--src/main.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 55dd706..18aee07 100644
--- a/src/main.c
+++ b/src/main.c
@@ -171,9 +171,14 @@ main(int argc, char **argv)
(void)fclose(fstream);
#else
- if (argc == 1)
+ if (argc == 1) {
argv = (static char *[]){"-"};
- else {
+ /* TODO: Can we test this in an OpenBSD VM? */
+#if 0 && defined(__OpenBSD__)
+ if (pledge("stdio") == -1)
+ cerr(EXIT_FATAL, "pledge:");
+#endif
+ } else {
argc--;
argv++;
flags.do_header = true;