Article View: net.bugs
Article #569csh: bus error msgs to stdout
From: mcdaniel
Date: Mon, 21 Jul 1986 23:03
Date: Mon, 21 Jul 1986 23:03
43 lines
1673 bytes
1673 bytes
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
Technical Details
Message-ID:
<14400001@uicsrd>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!seismo!lll-crg!caip!clyde!cbatt!cbosgd!ihnp4!inuxc!pur-ee!uiucdcs!uicsrd!mcdanielShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!lll-crg!caip!clyde!cbatt!cbosgd!ihnp4!inuxc!pur-ee!uiucdcs!uicsrd!mcdaniel From: mcdaniel@uicsrd.CSRD.UIUC.EDU Newsgroups: net.bugs Subject: csh: bus error msgs to stdout Message-ID: <14400001@uicsrd> Date: Mon, 21-Jul-86 19:03:00 EDT Article-I.D.: uicsrd.14400001 Posted: Mon Jul 21 19:03:00 1986 Date-Received: Fri, 25-Jul-86 07:03:10 EDT Lines: 43 Nf-ID: #N:uicsrd:14400001:000:1085 Nf-From: uicsrd.CSRD.UIUC.EDU!mcdaniel Jul 21 18:03:00 1986