]> git.lyx.org Git - lyx.git/blobdiff - src/support/syscall.C
use more explicit on constructors use the pimpl idom to reduce size with about 500k
[lyx.git] / src / support / syscall.C
index 2ea868f73d2b3962f81e112125674d9f5aa93c24..ca1bf384bca2ea15fc8ffec4615254f631e37f1f 100644 (file)
@@ -9,12 +9,15 @@
 #include <sys/wait.h>
 #include <csignal>
 #include <cstdlib>
-#include <cstdio>
 #include <unistd.h>
 #include "debug.h"
 #include "syscall.h"
 #include "syscontr.h"
 #include "support/lstrings.h"
+#include "support/lyxlib.h"
+
+using std::endl;
+
 
 Systemcalls::Systemcalls() {
        pid = 0; // No child yet
@@ -34,7 +37,7 @@ Systemcalls::~Systemcalls() {
 #if 0
        // If the child is alive, we have to brutally kill it
        if (getpid() != 0) {
-               ::kill(getpid(), SIGKILL);
+               lyx::kill(getpid(), SIGKILL);
        }
 #endif
 }
@@ -73,12 +76,12 @@ int Systemcalls::startscript() {
        return retval;
 }
 
-void Systemcalls::kill(int tolerance) {
+void Systemcalls::kill(int /*tolerance*/) {
        if (getpid() == 0) {
                lyxerr << "LyX: Can't kill non-existing process." << endl;
                return;
        }
-       int ret = ::kill(getpid(), SIGHUP);
+       int ret = lyx::kill(getpid(), SIGHUP);
        bool wait_for_death = true;
        if (ret != 0) {
                if (errno == ESRCH) {
@@ -205,7 +208,7 @@ void back(string cmd, int retval)
 }
 
 
-int main(int, char**)
+int main(int, char **)
 {
        
        SystemcallsSingletoncontroller::Startcontroller starter;