[comp.mail.mush] Temporary patch for MUSH 6.5.5

dws@cseg.uucp (David W. Summers) (06/27/89)

Well, I just applied the new MUSH 6.5.5 patch and much to my astonishment, when
I tried to run it on my SCO Xenix 2.2.3 system I got a core dump!  I first tried
looking at the core file with adb but since the MUSH automatic signal handlers
got there first, I couldn't determine where the error was occuring.  Then I
tried recompiling without the INTERNAL_MALLOC defined but got the same error.
What DID work was when I re-ran MUSH inside 'adb' and THEN I found out approx.
where the error was occuring.  At that point I found references to the
'mailfile' file variable.  I then looked in the Patch file and sure enough, in
the 'options.c' file there is a patch that replaces:

    mailfile = "";

  with 

    flags->folder = "";

Well, that is fine as far as it goes but there are still many references to 
'mailfile' in the program.  So, here is the patch.  It seems to work for me.
I normally wouldn't post something like this but I spent about 4 hours on it
and hope to keep other people from doing the same.

DISCLAIMER:  I really don't understand all that is going on with 'flags->folder'
and 'mailfile' variables so it is possible that this isn't a complete fix and/or
it messes something else up, but if so, I haven't found it yet.


   - David Summers
=============================   Patch follows   ================================
*** options.c.old	Tue Jun 27 03:15:11 1989
--- options.c	Tue Jun 27 03:06:05 1989
***************
*** 159,164 ****
--- 159,165 ----
      bzero(flags, sizeof (struct mush_flags));
      flags->source_rc = TRUE;
      flags->folder = "";
+     mailfile = "";
  
      for (++(*argvp); **argvp && ***argvp == '-'; (*argvp)++) {
  	int look_again;
==============================   End of patch   ================================

neighorn@nosun.UUCP ( SE Sun/PDX) (06/29/89)

In article <2669@cveg.uucp> dws@cseg.uucp (David W. Summers) writes:
>Well, I just applied the new MUSH 6.5.5 patch and much to my astonishment, when
>I tried to run it on my SCO Xenix 2.2.3 system I got a core dump!  I first tried...

Yup, you found an error. Until an official patch for Patch5 comes out,
and if you don't want to make random hacks to the code, you can specify
your system mail folder via the -f command, ie:

mush -t -f /usr/spool/mail/myname

-- 
Steven C. Neighorn           !tektronix!{psu-cs,nosun,ogccse}!qiclab!neighorn
Sun Microsystems, Inc.      "Where we DESIGN the Star Fighters that defend the
9900 SW Greenburg Road #240     frontier against Xur and the Ko-dan Armada"
Portland, Oregon 97223          work: (503) 684-9001 / home: (503) 641-3469