Skip to content
This repository was archived by the owner on Feb 28, 2025. It is now read-only.

Commit e5020d1

Browse files
committed
(main): clarify nested start process
Signed-off-by: Yury V. Zaytsev <[email protected]>
1 parent 8b905ee commit e5020d1

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

src/main.c

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -415,23 +415,19 @@ main (int argc, char *argv[])
415415
// inherit the file descriptors opened below, etc
416416
if (mc_global.tty.use_subshell && mc_global.run_from_parent_mc)
417417
{
418-
int r;
419-
420-
r = query_dialog (_ ("Warning"),
418+
const int quit_mc =
419+
query_dialog (_ ("Warning"),
421420
_ ("GNU Midnight Commander\nis already running on this terminal.\n"
422421
"Subshell support will be disabled."),
423422
D_ERROR, 2, _ ("&OK"), _ ("&Quit"));
424-
if (r == 0)
425-
{
426-
// parent mc was found and the user wants to continue
427-
;
428-
}
429-
else
423+
424+
if (quit_mc != 0)
430425
{
431426
// parent mc was found and the user wants to quit mc
432427
mc_global.midnight_shutdown = TRUE;
433428
}
434429

430+
// quit or not, disable nested subshell
435431
mc_global.tty.use_subshell = FALSE;
436432
}
437433

0 commit comments

Comments
 (0)