Article View: gnu.utils.bug
Article #30screen3.2 bug & tiny patch
From: Geoff Wing
Date: Sat, 31 Oct 1992 12:29
Date: Sat, 31 Oct 1992 12:29
34 lines
1664 bytes
1664 bytes
Screen3.2 has a small bug seen if one has the "shell" keyword in one's
.screenrc file. Screen tries to free memory it obtained through a getenv()
and sgi/sysv machines (and probably some others) don't like this.
Here's a tiny patch for it:
*** screen.c Sat Oct 31 01:13:38 1992
--- screen.c.orig Fri Oct 23 12:24:48 1992
***************
*** 766,774 ****
signal(SIGBUS, CoreDump);
signal(SIGSEGV, CoreDump);
}
! if (!ShellProg && (ShellProg = getenv("SHELL")) == 0)
! if ((ShellProg = strdup(DefaultShell)) == NULL)
! abort(); /* ParseSaveStr may try to free ShellProg */
ShellArgs[0] = ShellProg;
#ifdef NETHACK
nethackflag = (getenv("NETHACKOPTIONS") != NULL);
--- 766,773 ----
signal(SIGBUS, CoreDump);
signal(SIGSEGV, CoreDump);
}
! if (!ShellProg && (ShellProg = getenv("SHELL")) == 0)
! ShellProg = DefaultShell;
ShellArgs[0] = ShellProg;
#ifdef NETHACK
nethackflag = (getenv("NETHACKOPTIONS") != NULL);
--
Geoff C. Wing | P.O. Box 4422
mason@phoenix.apana.org.au | Uni. of Melbourne
| Victoria 3052
Hurt...Agony...Pain...LOVE-IT | Australia
Technical Details
Message-ID:
<199210301429.AA04054@werple.apana.org.au>Path:
arc1-ca.pugleaf.net!sparky!uunet!think.com!sdd.hp.com!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!werple.apana.ORG.AU!masonShow Full Headers
Complete Article Headers
Newsgroups: gnu.utils.bug Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!sdd.hp.com!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!werple.apana.ORG.AU!mason From: mason@werple.apana.ORG.AU (Geoff Wing) Subject: screen3.2 bug & tiny patch Message-ID: <199210301429.AA04054@werple.apana.org.au> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Sat, 31 Oct 1992 12:29:10 GMT Approved: bug-gnu-utils@prep.ai.mit.edu Lines: 35