diff options
author | N-R-K <79544946+N-R-K@users.noreply.github.com> | 2022-03-17 19:18:22 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-17 19:18:22 +0000 |
commit | 1ef0c1f15280a3ae366d43e2e4a86b5a1e1d454e (patch) | |
tree | 271e360472bf1da23378fc30d9f19eda040f464a | |
parent | 7f71ddf4fc73e84f376e91eba499223d523e4950 (diff) |
fix: close the file descriptor in get_win_title() (#245)
this would eventually end up opening too many fds and erroring out with
"too many open files".
-rw-r--r-- | main.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -260,6 +260,7 @@ size_t get_win_title(unsigned char *buf, int len, bool init) if (pfd.readfd >= 0) { if ((n = read(pfd.readfd, buf, len-1)) > 0) buf[n] = '\0'; + close(pfd.readfd); } } |