Ticket #47 (new defect)

Opened 15 years ago

Last modified 10 years ago

savannah: Environment variables in a subshell

Reported by: phd Owned by:
Priority: major Milestone: Future Releases
Component: mc-core Version:
Keywords: Cc: iav@…
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description (last modified by ossi) (diff)

Original: http://savannah.gnu.org/bugs/?16757

Submitted by:Oleg Broytmann <phd>Submitted on:Tue 06 Jun 2006 06:43:30 AM UTC
Category:SubshellSeverity:3 - Normal
Status:NonePrivacy:Public
Assigned to:NoneOpen/Closed:Open
Release:4.6.1Operating System:GNU/Linux

Original submission:

I have a lot of different environments (Python, Java, Postgres and 
so on), and I source a config file when I want to change the 
environment; for example running "include svn" runs

. $HOME/lib/config/svn

that adds SVN directories to PATH, LD_LIBRARY_PATH and MANPATH. 
When I do this under Midnight Commander I have a minor problem with 
subshell (at least I think the problem is in the subshell). When I 
run a program in the mc command line (type "./a_script", press 
[Enter]) mc (subshell?) passes the modified env vars to the 
program. But if I just press [Enter] on the program mc passes an 
old environment as if I didn't source any config file; it seems 
after pressing [Enter] on a program mc passes its own original 
environment, not the subshell's environment. I think that's a bug; 
I'd like mc to pass the modified environment to all programs 
regardless of the way I start them.

Debian GNU/Linux 3.1, mc 4.6.1-pre3.

Change History

comment:1 follow-up: ↓ 3 Changed 15 years ago by guanx

It's already been fixed in the 2008-08-28 version of mc shipped with Slackware Linux 12.2. However, running a program using Alt-! still uses the old environment.

comment:2 Changed 15 years ago by styx

  • Milestone set to future releases

comment:3 in reply to: ↑ 1 Changed 10 years ago by ossi

  • Branch state set to no branch

Replying to guanx:

running a program using Alt-! still uses the old environment.

that's because the filter is not run through the subshell.
i'm not sure that should be considered a bug as such, but see #3141.

comment:4 Changed 10 years ago by ossi

  • Description modified (diff)
  • Reporter changed from slavazanko to phd

comment:5 Changed 10 years ago by iav

  • Cc iav@… added
Note: See TracTickets for help on using tickets.