1 /* Copyright (c) 1979 Regents of the University of California */ 2 3 static char sccsid[] = "@(#)PERROR.c 1.2 01/10/83"; 4 5 #include <stdio.h> 6 #include <signal.h> 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); 20 fputs(msg, stderr); 21 perror(fname); 22 kill(getpid(), SIGTRAP); 23 return 0; 24 } 25