diff options
| author | Sergey Zagursky <sz@joom.com> | 2026-07-09 09:23:43 +0100 |
|---|---|---|
| committer | Kenny Levinsen <kl@kl.wtf> | 2026-07-09 11:58:43 +0200 |
| commit | 83319e5ec7ae13794ebf39f753d643a2a439f594 (patch) | |
| tree | 85a94513149a4666ee1001afa599f40c90feb9fb /wlr-input-inhibitor-unstable-v1.xml | |
| parent | 1a4c472c11ee0354e5a689e33fad4ecce533ddc3 (diff) | |
main: fix reversed dup2 arguments in daemonize
daemonize() intends to redirect the daemon's stdout and stderr to
/dev/null, but the dup2() arguments are reversed. dup2(oldfd, newfd)
duplicates oldfd onto newfd; the code passes STDOUT_FILENO/STDERR_FILENO
as oldfd and the freshly opened /dev/null descriptor as newfd, so it
overwrites the /dev/null fd with stdout/stderr and then closes it.
stdout and stderr are never redirected and stay attached to the
controlling terminal.
Swap the arguments so /dev/null is duplicated onto STDOUT_FILENO and
STDERR_FILENO as intended.
Diffstat (limited to 'wlr-input-inhibitor-unstable-v1.xml')
0 files changed, 0 insertions, 0 deletions
