1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-20 21:08:08 +01:00

fixed Restart() function, and crashing dialog call to this function

This commit is contained in:
dan
1999-04-17 20:25:07 +00:00
parent afcbe06363
commit 8bdc78fcd1
4 changed files with 18 additions and 28 deletions

View File

@@ -78,8 +78,6 @@ extern const char * const sys_siglist[];
/****** Global Variables ******/
extern char **Arguments;
extern WPreferences wPreferences;
extern WDDomain *WDWindowMaker;
@@ -336,22 +334,15 @@ handleSig(int sig)
if (crashAction == WMRestart) {
/* we try to restart Window Maker */
wwarning(_("trying to restart Window Maker..."));
execvp(Arguments[0], Arguments);
wwarning(_("we failed to restart Window Maker."));
Restart(NULL, False);
/* fallback to alternate window manager then */
}
wwarning(_("trying to start alternate window manager..."));
argv[0] = FALLBACK_WINDOWMANAGER;
execvp(FALLBACK_WINDOWMANAGER, argv);
argv[0] = "fvwm";
execvp("fvwm", argv);
argv[0] = "twm";
execvp("twm", argv);
Restart(FALLBACK_WINDOWMANAGER, False);
Restart("fvwm", False);
Restart("twm", False);
wfatal(_("failed to start alternate window manager. Aborting."));
#else
wfatal(_("a fatal error has occured, probably due to a bug. "