mcdaniel@uicsrd.CSRD.UIUC.EDU (07/22/86)
Subject: csh can send bus error messages to stdout Index: bin/csh 4.2BSD Description: If a program called from a shell script has a bus error, the message is sent to the script's standard output. This behavior seems counterintuitive. (I had redirected standard output, and kept wondering "Where is that core file coming from?".) This occurs under BSD 4.2; I don't know about any other csh versions. Repeat-By: Script started on Mon Jul 21 17:31:25 1986 [with annotations] % cat > t.c main() { char *t = 0; *t = 999; } [this provokes a bus error on most machines, VAXen included. You might have to provoke it some other way.] ^D % cc t.c % a.out > /dev/null Bus error (core dumped) [as expected] % cat > t.csh #! /bin/csh -f a.out ^D % chmod a+x t.csh % t.csh Bus error (core dumped) [as expected] % rm core % t.csh > file [no reply] % ls a.out file t.csh core t.c typescript [core file silently appears] % cat -n file 1 Bus error (core dumped) [message went into file] % exit % script done on Mon Jul 21 17:34:43 1986