xref: /original-bsd/lib/libc/gen/setjmperr.c (revision c3e32dec)
1 /*
2  * Copyright (c) 1980, 1993
3  *	The Regents of the University of California.  All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  */
7 
8 #if defined(LIBC_SCCS) && !defined(lint)
9 static char sccsid[] = "@(#)setjmperr.c	8.1 (Berkeley) 06/04/93";
10 #endif /* LIBC_SCCS and not lint */
11 
12 /*
13  * This routine is called from longjmp() when an error occurs.
14  * Programs that wish to exit gracefully from this error may
15  * write their own versions.
16  * If this routine returns, the program is aborted.
17  */
18 
19 #include <setjmp.h>
20 #include <unistd.h>
21 
22 void
23 longjmperror()
24 {
25 #define	ERRMSG	"longjmp botch.\n"
26 	(void)write(STDERR_FILENO, ERRMSG, sizeof(ERRMSG) - 1);
27 }
28