fix accidental runaway forks

This commit is contained in:
K. Lange 2018-06-04 17:44:51 +09:00
parent 91fdce2c27
commit 53d041135c
3 changed files with 5 additions and 0 deletions

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -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);
}
}