Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 67530

Summary: mc crashes if TERM environment variable unset
Product: Gentoo Linux Reporter: Erik Thiele <erik>
Component: Current packagesAssignee: Heinrich Wendel (RETIRED) <lanius>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Erik Thiele 2004-10-14 04:10:53 UTC
if the TERM environment variable is not set, mc crashes

Reproducible: Always
Steps to Reproduce:
1. start an xterm
2. verify that TERM=xterm
3. start mc, see that it works, stop it again
4. unset TERM
5. verify that TERM=
6. start mc
7. See Segmentation Fault



Expected Results:  
say "i cannot run with dumb terminal"
Comment 1 Heinrich Wendel (RETIRED) gentoo-dev 2004-10-23 15:17:26 UTC
why should one unset the TERM variable?
Comment 2 Heinrich Wendel (RETIRED) gentoo-dev 2004-11-06 07:19:46 UTC
why should one unset the TERM variable?
Comment 3 Erik Thiele 2004-11-07 22:07:36 UTC
well, it happened by accident that my TERM variable got unset.
but imagine if all programs just crash in case of wrong parameters.
this is not the way to write programs. it's an error and must be fixed.

you should not argue "why should one unset the TERM variable?"

X11 programs also don't just silently crash if the DISPLAY variable is unset.
instead they all display useful error message.

did you report the issue upstream or just silently ignore it??
Comment 4 Heinrich Wendel (RETIRED) gentoo-dev 2004-11-08 13:39:35 UTC
that's correct indeed, i'll look into reporting it upstream
Comment 5 Heinrich Wendel (RETIRED) gentoo-dev 2004-11-17 05:46:54 UTC
fixed in -r12