diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-10-31 12:42:45 +0100 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-10-31 12:42:45 +0100 |
commit | 3f866cec7095cd80307ff0f5203538b49f43cf3f (patch) | |
tree | ac8f071f1ae2e2705e6958da8810996136629025 /src/main.c | |
parent | 87b3bc8c4015222b463e713f9b68daebb95515c9 (diff) |
Add another pledge(2) location
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -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; |