140865Sbostic /*- 2*62094Sbostic * Copyright (c) 1979, 1993 3*62094Sbostic * The Regents of the University of California. All rights reserved. 440865Sbostic * 540865Sbostic * %sccs.include.redist.c% 640865Sbostic */ 73870Smckusick 840865Sbostic #ifndef lint 9*62094Sbostic static char sccsid[] = "@(#)PERROR.c 8.1 (Berkeley) 06/06/93"; 1040865Sbostic #endif /* not lint */ 113870Smckusick 123870Smckusick #include <stdio.h> 133870Smckusick #include <signal.h> 143870Smckusick 153870Smckusick /* 163870Smckusick * Routine PERROR is called from the runtime library when a runtime 173870Smckusick * I/O error occurs. Its arguments are a pointer to an error message and 183870Smckusick * the name of the offending file. 193870Smckusick */ 203870Smckusick long PERROR(msg,fname)213870SmckusickPERROR(msg, fname) 223870Smckusick 233870Smckusick char *msg, *fname; 243870Smckusick { 253870Smckusick PFLUSH(); 263870Smckusick fputc('\n',stderr); 273870Smckusick fputs(msg, stderr); 283870Smckusick perror(fname); 2910226Smckusick kill(getpid(), SIGTRAP); 303870Smckusick return 0; 313870Smckusick } 32