286: Why no core dump?

Andrew ValenciaSeattle vandys at hpcupt1.HP.COM
Tue Oct 11 01:02:18 AEST 1988


/ hpcupt1:comp.unix.microport / brwk at doc.ic.ac.uk (Bevis King) /  4:47 am  Oct  5, 1988 /

>I am attempting to get the public domain basic interpreter posted
>to comp.sources.unix working on Microport SV/AT.  The problem I have
>is that the program terminates with an "Illegal allignment" message.

	Sounds like your interpreter is trying to kill itself after finding
an internal inconsistency.  Is the string "Illegal allignment" (sic)
a string in the program?  Check the code which tries to kill itself.
One way to make it happen is to write a fork() which reverses the parent
and child.  Then when the "parent" tries to kill the child, it actually
kills PID 0, which blows away the process group.  If it's using SIGKILL,
even the debugger and shell must die.  I.e.,

	#include <signal.h>
	int pid;

	if( pid = fork() ){
		printf("Child sleeping.\n");
		pause();
	} else {
		printf("Parent, killing child!\n");
		kill( pid, SIGKILL );
	}

	when you actually want:

	if( !(pid = fork()) ){
		...

					Good luck!
					Andy



More information about the Comp.unix.microport mailing list