diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/Exceptions.cc | 10 | ||||
| -rw-r--r-- | lib/Handle.cc | 7 | ||||
| -rw-r--r-- | lib/ReadJob.cc | 2 | ||||
| -rw-r--r-- | lib/Socket.cc | 4 | ||||
| -rw-r--r-- | lib/TaskMan.cc | 2 | 
5 files changed, 19 insertions, 6 deletions
| diff --git a/lib/Exceptions.cc b/lib/Exceptions.cc index 096ba46..f37832d 100644 --- a/lib/Exceptions.cc +++ b/lib/Exceptions.cc @@ -17,7 +17,7 @@   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA   */ -/* $Id: Exceptions.cc,v 1.40 2006-10-28 16:42:19 pixel Exp $ */ +/* $Id: Exceptions.cc,v 1.41 2006-11-14 10:10:10 pixel Exp $ */  #include <string.h>  #include <errno.h> @@ -38,6 +38,10 @@  #ifdef HAVE_PIPE  #include <unistd.h>  #endif +#ifdef HAVE_FORK +#include <sys/types.h> +#include <sys/wait.h> +#endif	        #include "BString.h"  #include "Exceptions.h"  #include "generic.h" @@ -208,9 +212,9 @@ pid_t xfork() throw (GeneralException) {  }  #endif -#ifdef HAVE_WAIT +#ifdef HAVE_FORK  pid_t xwait(int * s) throw (GeneralException) { -    return wait(s); +    return ::wait(s);  }  #else  pid_t xwait(int *) throw (GeneralException) { diff --git a/lib/Handle.cc b/lib/Handle.cc index b61e063..ceb10f6 100644 --- a/lib/Handle.cc +++ b/lib/Handle.cc @@ -17,7 +17,7 @@   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA   */ -/* $Id: Handle.cc,v 1.77 2006-02-02 14:09:48 pixel Exp $ */ +/* $Id: Handle.cc,v 1.78 2006-11-14 10:10:10 pixel Exp $ */  #include <stdio.h>  #include <string.h> @@ -238,6 +238,11 @@ Handle & operator>>(Handle & h, String & s) {      return h;  } +void Handle::tagclose() { +    closed = 1; +    h = -1; +} +  void Handle::close() throw (GeneralException) {      if (IsClosed()) {  	return; diff --git a/lib/ReadJob.cc b/lib/ReadJob.cc index f6ef248..7c96876 100644 --- a/lib/ReadJob.cc +++ b/lib/ReadJob.cc @@ -28,7 +28,7 @@ int ReadJob::Do() throw (GeneralException) {  	}      case 1:  	try { -	    *d << buff << endnl; +	    *d << buff << "\n";  	}  	catch (IOAgain e) {  	    current = 1; diff --git a/lib/Socket.cc b/lib/Socket.cc index 5a6cede..f417bf9 100644 --- a/lib/Socket.cc +++ b/lib/Socket.cc @@ -208,5 +208,9 @@ int Socket::ndup() const throw (GeneralException) {  }  int Socket::nclose() throw (GeneralException) { +#ifdef _WIN32      return closesocket(GetHandle()); +#else +    return Handle::nclose(); +#endif  } diff --git a/lib/TaskMan.cc b/lib/TaskMan.cc index a1aa4b1..31ed942 100644 --- a/lib/TaskMan.cc +++ b/lib/TaskMan.cc @@ -225,7 +225,7 @@ void TaskMan::Init() throw (GeneralException) {  #ifndef _WIN32      signal(SIGCHLD, taskman_sigchild); -    signal(SIGPIPE, taskman_sighole); +    signal(SIGPIPE, taskman_sigpipe);      signal(SIGHUP, taskman_sighup);      sigemptyset(&sigchildset); | 
