make error messages a little better, use constants in unistd.h
[unix-history] / usr / src / lib / libc / gen / setjmperr.c
CommitLineData
5af61c73
KM
1/*
2 * Copyright (c) 1980 Regents of the University of California.
f6d6f23b
KB
3 * All rights reserved.
4 *
269a7923 5 * %sccs.include.redist.c%
5af61c73
KM
6 */
7
2ce81398 8#if defined(LIBC_SCCS) && !defined(lint)
90793b84 9static char sccsid[] = "@(#)setjmperr.c 5.7 (Berkeley) %G%";
f6d6f23b 10#endif /* LIBC_SCCS and not lint */
5af61c73
KM
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 */
f6d6f23b 18
90793b84 19#include <unistd.h>
f964b2d3 20
5af61c73
KM
21longjmperror()
22{
90793b84
KB
23#define ERRMSG "longjmp botch.\n"
24 (void)write(STDERR_FILENO, ERRMSG, sizeof(ERRMSG) - 1);
5af61c73 25}