Bug 4302 - /etc/profile.d/mc.sh: missing export -f makes function mc() vanish in non-console sessions
/etc/profile.d/mc.sh: missing export -f makes function mc() vanish in non-con...
Product: Red Hat Linux
Classification: Retired
Component: mc (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: David Lawrence
Depends On:
  Show dependency treegraph
Reported: 1999-08-01 13:55 EDT by Christian Hechelmann
Modified: 2008-05-01 11:37 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 1999-08-23 15:02:34 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Christian Hechelmann 1999-08-01 13:55:22 EDT
When logging in via xdm/kdm/gdm any settings from
/etc/profile, and /etc/profile.d/* silently vanish. However
e.g. /etc/X11/gdm/Sessions/* get run and whithin these
scripts the settings are still there.
Comment 1 Christian Hechelmann 1999-08-01 18:23:59 EDT
It turns out that the observations I made are actually slightly
different: I noticed the whole thing because I modified
/etc/profile.d/mc.sh so that mc was passed an additional parameter and
this parameter (and the whole mc function) didn't show up in an
kvt/xterm/gnome-terminal. Close reading of the bash man-page revealed
that one needs to explicitly do "export -f <function name>" to get the
function in child processes..

Summary and component changed to reflect this.
Comment 2 Jeff Johnson 1999-08-23 15:02:59 EDT
This appears to not be a problem: exporting names so that will
be passed to children is the behavior of bash (and other shells).

Note You need to log in before you can comment on or make changes to this bug.