| 1 | /* env - run a program in a modified environment
|
|---|
| 2 | Copyright (C) 1986, 1991-2005 Free Software Foundation, Inc.
|
|---|
| 3 |
|
|---|
| 4 | This program is free software; you can redistribute it and/or modify
|
|---|
| 5 | it under the terms of the GNU General Public License as published by
|
|---|
| 6 | the Free Software Foundation; either version 2, or (at your option)
|
|---|
| 7 | any later version.
|
|---|
| 8 |
|
|---|
| 9 | This program is distributed in the hope that it will be useful,
|
|---|
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 12 | GNU General Public License for more details.
|
|---|
| 13 |
|
|---|
| 14 | You should have received a copy of the GNU General Public License
|
|---|
| 15 | along with this program; if not, write to the Free Software Foundation,
|
|---|
| 16 | Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
|---|
| 17 |
|
|---|
| 18 | /* Richard Mlynarik and David MacKenzie */
|
|---|
| 19 |
|
|---|
| 20 | /* Options:
|
|---|
| 21 | -
|
|---|
| 22 | -i
|
|---|
| 23 | --ignore-environment
|
|---|
| 24 | Construct a new environment from scratch; normally the
|
|---|
| 25 | environment is inherited from the parent process, except as
|
|---|
| 26 | modified by other options.
|
|---|
| 27 |
|
|---|
| 28 | -u variable
|
|---|
| 29 | --unset=variable
|
|---|
| 30 | Unset variable VARIABLE (remove it from the environment).
|
|---|
| 31 | If VARIABLE was not set, does nothing.
|
|---|
| 32 |
|
|---|
| 33 | variable=value (an arg containing a "=" character)
|
|---|
| 34 | Set the environment variable VARIABLE to value VALUE. VALUE
|
|---|
| 35 | may be of zero length ("variable="). Setting a variable to a
|
|---|
| 36 | zero-length value is different from unsetting it.
|
|---|
| 37 |
|
|---|
| 38 | --
|
|---|
| 39 | Indicate that the following argument is the program
|
|---|
| 40 | to invoke. This is necessary when the program's name
|
|---|
| 41 | begins with "-" or contains a "=".
|
|---|
| 42 |
|
|---|
| 43 | The first remaining argument specifies a program to invoke;
|
|---|
| 44 | it is searched for according to the specification of the PATH
|
|---|
| 45 | environment variable. Any arguments following that are
|
|---|
| 46 | passed as arguments to that program.
|
|---|
| 47 |
|
|---|
|
|---|