blob: 4a4d11d5993833b6ca400ae069d6404ba3d8781a [file] [log] [blame]
Guido van Rossumabe173a1994-06-03 15:58:29 +00001/***********************************************************
Guido van Rossum6d023c91995-01-04 19:12:13 +00002Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
3The Netherlands.
Guido van Rossumabe173a1994-06-03 15:58:29 +00004
5 All Rights Reserved
6
7Permission to use, copy, modify, and distribute this software and its
8documentation for any purpose and without fee is hereby granted,
9provided that the above copyright notice appear in all copies and that
10both that copyright notice and this permission notice appear in
11supporting documentation, and that the names of Stichting Mathematisch
12Centrum or CWI not be used in advertising or publicity pertaining to
13distribution of the software without specific, written prior permission.
14
15STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
16THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
17FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
18FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
19WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
20ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
21OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
22
23******************************************************************/
24
25/* Sigcheck is similar to intrcheck() but sets an exception when an
26 interrupt occurs. It can't be in the intrcheck.c file since that
27 file (and the whole directory it is in) doesn't know about objects
28 or exceptions. It can't be in errors.c because it can be
29 overridden (at link time) by a more powerful version implemented in
30 signalmodule.c. */
31
32#include "allobjects.h"
33#include "intrcheck.h"
34
35/* ARGSUSED */
36int
37sigcheck()
38{
39 if (!intrcheck())
40 return 0;
41 err_set(KeyboardInterrupt);
42 return -1;
43}