summaryrefslogtreecommitdiff
path: root/src/pipeengine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pipeengine.cpp')
-rw-r--r--src/pipeengine.cpp26
1 files changed, 18 insertions, 8 deletions
diff --git a/src/pipeengine.cpp b/src/pipeengine.cpp
index 51dfa2955..b9ef61eab 100644
--- a/src/pipeengine.cpp
+++ b/src/pipeengine.cpp
@@ -1,12 +1,20 @@
/*
+ * Anope IRC Services
*
- * (C) 2003-2017 Anope Team
- * Contact us at team@anope.org
+ * Copyright (C) 2010-2017 Anope Team <team@anope.org>
*
- * Please read COPYING and README for further details.
+ * This file is part of Anope. Anope is free software; you can
+ * redistribute it and/or modify it under the terms of the GNU
+ * General Public License as published by the Free Software
+ * Foundation, version 2.
*
- * Based on the original code of Epona by Lara.
- * Based on the original code of Services by Andy Church.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see see <http://www.gnu.org/licenses/>.
*/
#include "services.h"
@@ -48,10 +56,11 @@ Pipe::~Pipe()
bool Pipe::ProcessRead()
{
+ char dummy[512];
+ while (read(this->GetFD(), dummy, sizeof(dummy)) == sizeof(dummy));
+
this->OnNotify();
- char dummy[512];
- while (read(this->GetFD(), dummy, 512) == 512);
return true;
}
@@ -76,5 +85,6 @@ bool Pipe::SetWriteBlocking(bool state)
void Pipe::Notify()
{
- this->Write("\0", 1);
+ this->Write("", 1);
}
+