From 775011d8a082368e3a41808c1c03115b6b78921e Mon Sep 17 00:00:00 2001 From: Pixel Date: Thu, 29 Nov 2001 00:02:20 +0000 Subject: More small changes... --- lib/Exceptions.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib/Exceptions.cc') diff --git a/lib/Exceptions.cc b/lib/Exceptions.cc index 10b82a5..6d24646 100644 --- a/lib/Exceptions.cc +++ b/lib/Exceptions.cc @@ -125,3 +125,15 @@ int xpipe(int * p, int flag) throw (GeneralException) { return p[flag]; } + +pid_t xfork() throw (GeneralException) { + pid_t p; + + p = fork(); + + if (p == -1) { + throw GeneralException("Was not able to fork().\n"); + } + + return p; +} -- cgit v1.2.3