Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

Commit

Permalink
i3bar: Properly close FDs
Browse files Browse the repository at this point in the history
  • Loading branch information
orestisfl committed Jan 12, 2021
1 parent 31580dd commit 0370c5e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions RELEASE-NOTES-next
Expand Up @@ -24,3 +24,4 @@ strongly encouraged to upgrade.
• fix workspaces not moving to assigned output after output becomes available
• fix duplicate bindcode after i3-config-wizard
• clear pixmap before drawing to prevent visual grabage in clients using 'Shape'
• i3bar: properly close file descriptors
4 changes: 4 additions & 0 deletions i3bar/src/child.c
Expand Up @@ -139,6 +139,10 @@ static void cleanup(void) {
if (stdin_io != NULL) {
ev_io_stop(main_loop, stdin_io);
FREE(stdin_io);
close(stdin_fd);
stdin_fd = 0;
close(child_stdin);
child_stdin = 0;
}

if (child_sig != NULL) {
Expand Down

0 comments on commit 0370c5e

Please sign in to comment.