diff options
| author | Devin J. Pohly <djpohly@gmail.com> | 2022-02-15 14:04:25 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-15 14:04:25 -0600 |
| commit | a15cb1e20e165caf936319f9cdfb86f57effdfa6 (patch) | |
| tree | 5ea202ad21bdaad559d785eb9c230bec09573975 | |
| parent | Merge pull request #189 from fauxmight/shift-6-is-asciicircum (diff) | |
| parent | -s: close unused fds (diff) | |
| download | dwl-a15cb1e20e165caf936319f9cdfb86f57effdfa6.tar.gz dwl-a15cb1e20e165caf936319f9cdfb86f57effdfa6.tar.bz2 dwl-a15cb1e20e165caf936319f9cdfb86f57effdfa6.tar.xz dwl-a15cb1e20e165caf936319f9cdfb86f57effdfa6.tar.zst dwl-a15cb1e20e165caf936319f9cdfb86f57effdfa6.zip | |
Merge pull request #160 from Humm42/closepipes
-s: close unused fds
Diffstat (limited to '')
| -rw-r--r-- | dwl.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -1827,11 +1827,13 @@ run(char *startup_cmd) EBARF("startup: fork"); if (startup_pid == 0) { dup2(piperw[0], STDIN_FILENO); + close(piperw[0]); close(piperw[1]); execl("/bin/sh", "/bin/sh", "-c", startup_cmd, NULL); EBARF("startup: execl"); } dup2(piperw[1], STDOUT_FILENO); + close(piperw[1]); close(piperw[0]); } /* If nobody is reading the status output, don't terminate */ |
