[comp.os.minix] Sh problem

cechew@bruce.OZ (Earl Chew) (02/13/90)

Posted on behalf of: R_Prandolini@csvax.qut.oz

	I have been trying for a while to determine the cause of a signalling
bug in the Minix ST 1.5 Shell. I compiled the shell with HI_TECH_C. Launching
a program and then terminating it with SIGINT (DEL) the shell falls over on
an illegal instruction trap.

RESEARCH:
	In the function onecommand in sh1.c at about line 238 the source line

	inparse=0;

appears. 

The program is launced (and killed) which lands back in the shells 
trap handler onintr().

the code for onintr() goes something like this

	if (talking){
		if (inparse){ ...
		}
	} else if ( heedint){
		...
		}
	}

Thus there are only two alternatives inparse and heedint.

In my case neither of these two cases was true and the routine fell out the
end, returning to some random address which happened to be on the stack at the
time presumably put there by MM.

Changing the above mentioned ocurrence of inparse = 0 to inparse = 1; solved
the problem. 

The question is, is this the correct fix for this problem. I am not really up
on how the shell works but running grep inparse and grep heedint revealed 
there is little close association between the manipulation of heedint and
inparse. Perhaps the solution should therefore be an else clause in onintr
calling fail(); ????

Would some of the shell gurus like to have a look at this problem.

                BOB
		EEZPRANDOLIN@qut.edu.au

	R. Lunnon sharing this box.

Opinions: You must be kidding ...


-- 
Earl Chew, Dept of Computer Science, Monash University, Australia 3168
ARPA: cechew%bruce.cs.monash.oz.au@uunet.uu.net  ACS : cechew@bruce.oz
----------------------------------------------------------------------