Article View: gnu.utils.bug
Article #29screen3.2(a) tiny patch
From: mason
Date: Sat, 31 Oct 1992 12:23
Date: Sat, 31 Oct 1992 12:23
32 lines
1739 bytes
1739 bytes
Here's a tiny patch for screen3.2(a). The problem is seen if someone has
the "shell" keyword in their .screenrc . Screen tries to free memory
that it got from a getenv(). sgi/sysv machines don't provide malloc()
memory for this.
*** 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:
<1crghbINN3kj@werple.apana.org.au>Path:
arc1-ca.pugleaf.net!sparky!uunet!think.com!rpi!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!werple.apana.ORG.AU!Geoff.C.WingShow Full Headers
Complete Article Headers
Newsgroups: gnu.utils.bug Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!rpi!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!werple.apana.ORG.AU!Geoff.C.Wing From: Geoff.C.Wing@werple.apana.ORG.AU (mason@phoenix.apana.org.au) Subject: screen3.2(a) tiny patch Message-ID: <1crghbINN3kj@werple.apana.org.au> Summary: Small fix for memory problem Keywords: screen Sender: gnulists@ai.mit.edu Organization: werple public-access unix, Melbourne Distribution: gnu Date: Sat, 31 Oct 1992 12:23:38 GMT Approved: bug-gnu-utils@prep.ai.mit.edu Lines: 33