diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2021-01-15 12:21:11 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2021-01-15 12:21:11 -0800 |
| commit | 26fed0ec2848b023131df8c4fb967c360e0382a4 (patch) | |
| tree | 61e379b9b8370a48892d26713223abc226fdbfc7 | |
| parent | cbe1d97b37963a7ab75900463570cb6a109be8b4 (diff) | |
Don't close stdin
| -rw-r--r-- | file_loader.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/file_loader.c b/file_loader.c index acbf8a6..a8fa98c 100644 --- a/file_loader.c +++ b/file_loader.c @@ -80,7 +80,7 @@ file_t *load_file(file_t **files, const char *fmt, ...) if (length >= capacity) f->contents = xrealloc(f->contents, sizeof(char)*(capacity *= 2) + 1); } - close(fd); + if (fd != STDIN_FILENO) close(fd); finished_loading: f->end = &f->contents[length]; |
