From: Rafał Długołęcki Date: Mon, 25 Jan 2016 01:32:45 +0000 (+0100) Subject: Additional error messages X-Git-Tag: 3.4-b1~46 X-Git-Url: https://git.dlugolecki.net.pl/?a=commitdiff_plain;h=6eb8fff3207557d5944fcca17982290b16724477;p=vlp.git Additional error messages --- diff --git a/src/kernel/kernel.cpp b/src/kernel/kernel.cpp index 578498c..dbe7359 100644 --- a/src/kernel/kernel.cpp +++ b/src/kernel/kernel.cpp @@ -192,7 +192,6 @@ void QKernel::loadConfig(const QString & fname) */ void QKernel::loadConfig(const char * fname) { - fprintf(stderr, "2: %s\n", fname); config_t cfg; config_setting_t *setting; @@ -324,6 +323,13 @@ void QKernel::on_actionEditor_triggered() WriteMessage("Executing logedit failed!"); } } + else if (pid < 0) { + WriteMessage("fork(logedit) failed!"); + WriteMessage("Exiting..."); + sleep(2); + on_actionQuit_triggered(); + exit(3); + } } /** @@ -352,6 +358,13 @@ void QKernel::on_actionHelp_triggered() WriteMessage("Executing loghelp failed!"); } } + else if (pid < 0) { + WriteMessage("fork(loghelp) failed!"); + WriteMessage("Exiting..."); + sleep(2); + on_actionQuit_triggered(); + exit(3); + } } /** @@ -363,6 +376,7 @@ void QKernel::RunGraphModule(char *sk) QString program = getHomeDir(); program += "/modules/loggraph"; + pid_t pid = fork(); if (pid == 0) { if (execl(program.toStdString().c_str(),