🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by mcdaniel Mon, 21 Jul 1986 23:03
csh: bus error msgs to stdout
#569
Author: mcdaniel
Date: Mon, 21 Jul 1986 23:03
43 lines
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads