diff options
author | Ray Lai <ray@cvs.openbsd.org> | 2007-05-29 00:21:52 +0000 |
---|---|---|
committer | Ray Lai <ray@cvs.openbsd.org> | 2007-05-29 00:21:52 +0000 |
commit | b728d5369c26c00e2015d91c455dffe74c2033f2 (patch) | |
tree | f8983b80125d0e3f526310afa5e793ee27b6d44b /usr.bin/cvs/fatal.c | |
parent | 3a6280ede9c3d810e07d583d2dd32bb660be6295 (diff) |
I've been running with an abort upon fatal loop, and I think I've
mostly gotten rid of them. It would be nice to know if there is a
fatal loop instead of dying quietly, so call errx instead of exit(1).
errx does not call fatal so it should be fine.
OK niallo@
Diffstat (limited to 'usr.bin/cvs/fatal.c')
-rw-r--r-- | usr.bin/cvs/fatal.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/cvs/fatal.c b/usr.bin/cvs/fatal.c index 1b88b4717f2..080b8696150 100644 --- a/usr.bin/cvs/fatal.c +++ b/usr.bin/cvs/fatal.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fatal.c,v 1.11 2007/05/26 23:50:46 ray Exp $ */ +/* $OpenBSD: fatal.c,v 1.12 2007/05/29 00:21:51 ray Exp $ */ /* * Copyright (c) 2002 Markus Friedl. All rights reserved. * @@ -25,6 +25,7 @@ #include <sys/stat.h> +#include <err.h> #include <fcntl.h> #include <stdlib.h> @@ -41,7 +42,7 @@ fatal(const char *fmt,...) /* Fatal should not loop, (the functions below can fatal). */ if (been_here++) - goto end; + errx(1, "fatal loop"); va_start(args, fmt); cvs_vlog(LP_ABORT, fmt, args); @@ -49,6 +50,5 @@ fatal(const char *fmt,...) cvs_cleanup(); - end: exit(1); } |