Commit | Line | Data |
---|---|---|
1162b0b7 KM |
1 | /* Copyright (c) 1979 Regents of the University of California */ |
2 | ||
5e75e883 | 3 | static char sccsid[] = "@(#)PERROR.c 1.2 %G%"; |
1162b0b7 KM |
4 | |
5 | #include <stdio.h> | |
6 | #include <signal.h> | |
1162b0b7 KM |
7 | |
8 | /* | |
9 | * Routine PERROR is called from the runtime library when a runtime | |
10 | * I/O error occurs. Its arguments are a pointer to an error message and | |
11 | * the name of the offending file. | |
12 | */ | |
13 | long | |
14 | PERROR(msg, fname) | |
15 | ||
16 | char *msg, *fname; | |
17 | { | |
18 | PFLUSH(); | |
19 | fputc('\n',stderr); | |
1162b0b7 KM |
20 | fputs(msg, stderr); |
21 | perror(fname); | |
5e75e883 | 22 | kill(getpid(), SIGTRAP); |
1162b0b7 KM |
23 | return 0; |
24 | } |