add http error pages (#381)

* implement 404 for webserver - this is a quick hack, should be refactored later

* add http error pages ... design is more a placebo ;-)

* tune errorpages
fix some cgi related stuff, now only python is possible
executing and reading python file is possilbe, but it cannot receive any data from webui

* fix typo

* fix another typo
This commit is contained in:
redPanther
2017-01-29 21:20:12 +01:00
committed by GitHub
parent c43c7e3fcd
commit 7f2d6bde9a
15 changed files with 161 additions and 79 deletions

View File

@@ -33,6 +33,12 @@ using namespace commandline;
void signal_handler(const int signum)
{
if(signum == SIGCHLD)
{
// only quit when a registered child process is gone
// currently this feature is not active ...
return;
}
QCoreApplication::quit();
// reset signal handler to default (in case this handler is not capable of stopping)
@@ -42,7 +48,8 @@ void signal_handler(const int signum)
void startNewHyperion(int parentPid, std::string hyperionFile, std::string configFile)
{
if ( fork() == 0 )
pid_t childPid = fork(); // child pid should store elsewhere for later use
if ( childPid == 0 )
{
sleep(3);
execl(hyperionFile.c_str(), hyperionFile.c_str(), "--parent", QString::number(parentPid).toStdString().c_str(), configFile.c_str(), NULL);
@@ -62,6 +69,7 @@ int main(int argc, char** argv)
signal(SIGINT, signal_handler);
signal(SIGTERM, signal_handler);
signal(SIGABRT, signal_handler);
signal(SIGCHLD, signal_handler);
signal(SIGPIPE, signal_handler);