diff options
| author | onelin <oscar@nelin.dk> | 2026-09-05 11:33:18 +0000 |
|---|---|---|
| committer | onelin <oscar@nelin.dk> | 2026-09-05 11:33:18 +0000 |
| commit | 2027db0a980fd179537bbce2cef6f29a57929c4b (patch) | |
| tree | c86d53b9c8b206cfe5701edd56031f8727d62c0f | |
| parent | b86db843ec4838f6785bc66a6813f5e324ffb5de (diff) | |
Open files with CLOEXEC
| -rw-r--r-- | Makefile | 5 | ||||
| -rw-r--r-- | main.c | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,2 +1,7 @@ +.PHONY: check + frontend: main.c clang -g -Og -O0 -Wall -Werror -pedantic -Wextra -std=c99 -lc main.c -o frontend + +check: frontend + clang-tidy -checks=* main.c -- -std=c99 @@ -66,7 +66,7 @@ main(int argc, char* argv[]) { Token_t* tokens = NULL; Location_t** lines = NULL; - f = fopen(argv[1], "r"); + f = fopen(argv[1], "re"); if (f == NULL) { fprintf(stdout, "! Failed to open file: %s\n", argv[1]); } |
