bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: read-only flag is lost for functions in sub shells


From: Greg Wooledge
Subject: Re: read-only flag is lost for functions in sub shells
Date: Fri, 1 Aug 2014 08:21:48 -0400
User-agent: Mutt/1.4.2.3i

On Thu, Jul 31, 2014 at 04:45:20PM -0700, Linda Walsh wrote:
> Also noticing broken-ness upon using "sudo" -- functions defined
> at login are undefined:
> 
> >typeset -f|grep titlebar   
> titlebar ()
> declare -fx titlebar

Some implementations of sudo clear the environment before elevating
privileges.  Clearing the environment would also remove exported
functions, which are encoded as environment variables.  You might be
able to configure sudo to preserve your environment, but doing so is
well beyond the scope of bug-bash.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]