delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT sources DOT redhat DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT sources DOT redhat DOT com> |
List-Help: | <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT sources DOT redhat DOT com |
Delivered-To: | mailing list cygwin AT sources DOT redhat DOT com |
X-Envelope-Sender-Is: | helmut DOT dipper AT sicad DOT de (at relayer david.siemens.de) |
Message-ID: | <3A0966F3.34F75B3D@sicad.de> |
Date: | Wed, 08 Nov 2000 15:45:07 +0100 |
From: | Helmut Dipper <helmut DOT dipper AT sicad DOT de> |
Organization: | SICAD Utilities |
X-Mailer: | Mozilla 4.51 [en] (X11; I; SunOS 5.7 sun4m) |
X-Accept-Language: | en,de |
MIME-Version: | 1.0 |
To: | cygwin AT sourceware DOT cygnus DOT com |
Subject: | missing inheritance of exported shell function |
I use following bash-version: bash -version delivers: GNU bash, version 2.04.0(1)-release (i586-pc-cygwin) Copyright 1999 Free Software Foundation, Inc. on Windows-NT 4.0 SP5. During my tests I found following behaviour: Given the definitions VAR="xxx" ; export VAR function fct() { pwd; } ; export -f fct Consider the environments of subsequent started shells: - interactive shell "bash" variable VAR and function fct are inherited - interactive shell "sh" or shell-script with #!/bin/sh or shell-script with #!/bin/bash variable VAR is inherited but not function fct Question: Why is there a difference in the inheritance between variables and functions? Regards Helmut Dipper -- Helmut Dipper | SICAD Utilities GmbH phone: +49 89 636 41558 | Otto-Hahn-Ring 6 ___fax: +49 89 636 49613 | D-81730 Muenchen -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |