Browse Source

fix accidental runaway forks

K. Lange 2 years ago
parent
commit
53d041135c
3 changed files with 5 additions and 0 deletions
  1. 2 0
      apps/file-browser.c
  2. 1 0
      apps/help-browser.c
  3. 2 0
      apps/terminal.c

+ 2 - 0
apps/file-browser.c

@@ -67,6 +67,7 @@ static void _menu_action_help(struct MenuEntry * entry) {
 	/* show help documentation */
 	if (!fork()) {
 		system("help-browser file-browser.trt");
+		exit(0);
 	}
 }
 
@@ -74,6 +75,7 @@ static void _menu_action_about(struct MenuEntry * entry) {
 	/* Show About dialog */
 	if (!fork()) {
 		system("about \"About File Browser\" /usr/share/icons/48/folder.bmp \"ToaruOS File Browser\" \"(C) 2018 K. Lange\n-\nPart of ToaruOS, which is free software\nreleased under the NCSA/University of Illinois\nlicense.\n-\n%https://toaruos.org\n%https://github.com/klange/toaru-nih\"");
+		exit(0);
 	}
 }
 

+ 1 - 0
apps/help-browser.c

@@ -67,6 +67,7 @@ static void _menu_action_about(struct MenuEntry * entry) {
 	/* Show About dialog */
 	if (!fork()) {
 		system("about \"About Help Browser\" /usr/share/icons/48/help.bmp \"ToaruOS Help Browser\" \"(C) 2018 K. Lange\n-\nPart of ToaruOS, which is free software\nreleased under the NCSA/University of Illinois\nlicense.\n-\n%https://toaruos.org\n%https://github.com/klange/toaru-nih\"");
+		exit(0);
 	}
 }
 

+ 2 - 0
apps/terminal.c

@@ -1795,12 +1795,14 @@ void _menu_action_hide_borders(struct MenuEntry * self) {
 void _menu_action_show_about(struct MenuEntry * self) {
 	if (!fork()) {
 		system("about \"About Terminal\" /usr/share/icons/48/utilities-terminal.bmp \"ToaruOS Terminal\" \"(C) 2013-2018 K. Lange\n-\nPart of ToaruOS, which is free software\nreleased under the NCSA/University of Illinois\nlicense.\n-\n%https://toaruos.org\n%https://github.com/klange/toaru-nih\"");
+		exit(0);
 	}
 }
 
 void _menu_action_show_help(struct MenuEntry * self) {
 	if (!fork()) {
 		system("help-browser terminal.trt");
+		exit(0);
 	}
 }