Skip to content
Myr

application: preserve child's stdout/stderr

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Closes #480

authored by Daniel Eklöf · committed by Daniel Eklöf · parent 3d52cc1 · Browse files · 2 files+6 added−9 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+6 added−9 removed

  • other:+6 added−9 removed

2 files+6 added−9 removed

modified:application.c+3 added-9 removed
252 unmodified lines
253 /* And X11 startup notifications */254 setenv("DESKTOP_STARTUP_ID", xdg_activation_token, 1);255 }256257 /* Redirect stdin/stdout/stderr -> /dev/null */257 /* Redirect stdin -> /dev/null */258 int devnull_r = open("/dev/null", O_RDONLY | O_CLOEXEC);259 int devnull_w = open("/dev/null", O_WRONLY | O_CLOEXEC);260261 if (devnull_r == -1 || devnull_w == -1)259 if (devnull_r == -1)260 goto child_err;261264 if (dup2(devnull_r, STDIN_FILENO) == -1 ||265 dup2(devnull_w, STDOUT_FILENO) == -1 ||266 dup2(devnull_w, STDERR_FILENO) == -1)267 {262 if (dup2(devnull_r, STDIN_FILENO) == -1)263 goto child_err;269 }264265 execvp(argv[0], argv);266267 child_err:
121 unmodified lines
modified:CHANGELOG.md+3 added
43 unmodified lines
44 scaling filter, to improve performance ([#439][439]).45* Icon themes: 'scaled' directories are now ignored ([#459][459]).46* Border radius limited by max(horizontal-pad, vertical-pad), instead47 of min(horizontal-pad, vertical-pad) ([#436][436]).48* `stdout` and `stderr` of the launched application is now preserved,49 instead of being redirected to `/dev/null` ([#480][480]).5051[419]: https://codeberg.org/dnkl/fuzzel/issues/41952[439]: https://codeberg.org/dnkl/fuzzel/issues/43953[459]: https://codeberg.org/dnkl/fuzzel/issues/45954[436]: https://codeberg.org/dnkl/fuzzel/issues/43655[480]: https://codeberg.org/dnkl/fuzzel/issues/480565758### Deprecated59### Removed
850 unmodified lines