diff options
Diffstat (limited to 'src/pipeengine.cpp')
-rw-r--r-- | src/pipeengine.cpp | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/src/pipeengine.cpp b/src/pipeengine.cpp index 0953387c1..1a133641f 100644 --- a/src/pipeengine.cpp +++ b/src/pipeengine.cpp @@ -1,12 +1,20 @@ /* + * Anope IRC Services * - * (C) 2003-2016 Anope Team - * Contact us at team@anope.org + * Copyright (C) 2010-2016 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,6 +85,6 @@ bool Pipe::SetWriteBlocking(bool state) void Pipe::Notify() { - this->Write("\0", 1); + this->Write("", 1); } |