Skip to content

Commit ef45c4f

Browse files
Display fusermount --version output only in verbose mode (AppImage#105)
Co-authored-by: probonopd <[email protected]>
1 parent 942b2e7 commit ef45c4f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/runtime/runtime.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,13 @@ char* find_fusermount(bool verbose) {
472472

473473
if (pid == 0) {
474474
// Child process
475+
476+
// close stdout and stderr if not in verbose mode
477+
if (!verbose) {
478+
close(1);
479+
close(2);
480+
}
481+
475482
char* args[] = {fusermount_full_path, "--version", NULL};
476483
execvp(fusermount_full_path, args);
477484
// If execvp returns, it means the executable was not found

0 commit comments

Comments
 (0)