diff options
Diffstat (limited to 'lib/Exceptions.cc')
-rw-r--r-- | lib/Exceptions.cc | 12 |
1 files changed, 12 insertions, 0 deletions
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; +} |