summaryrefslogtreecommitdiff
path: root/src/posix/signalHandler.hpp
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2010-02-16 22:26:06 +0000
committerChristian Pointner <equinox@anytun.org>2010-02-16 22:26:06 +0000
commitfb886c8248d7d01f86f831fab9887e730d33ea6f (patch)
tree50ea62679521188b16663f3a6227aff5d033ac62 /src/posix/signalHandler.hpp
parentmalloc/free vs new at posix sysexec (diff)
allegedly-release-friendly dirty dirty dirty hack (concerning pids)
Diffstat (limited to 'src/posix/signalHandler.hpp')
-rw-r--r--src/posix/signalHandler.hpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/posix/signalHandler.hpp b/src/posix/signalHandler.hpp
index a5668b4..3851c78 100644
--- a/src/posix/signalHandler.hpp
+++ b/src/posix/signalHandler.hpp
@@ -73,8 +73,17 @@ int SigUsr2Handler(int /*sig*/, const std::string& /*msg*/)
return 0;
}
+/// TODO: this outstandignly ugly please and i really can't stress the please fix it asap!!!!!!!
+extern std::ofstream pidFile;
+
void handleSignal()
{
+ if(pidFile.is_open()) {
+ pid_t pid = getpid();
+ pidFile << pid;
+ pidFile.close();
+ }
+
struct timespec timeout;
sigset_t signal_set;
int sigNum;