[UP]


Manual Reference Pages  - system_clearenv (3)

NAME

system_clearenv(3f) - [M_system:ENVIRONMENT] clear environment by calling clearenv(3c) (LICENSE:PD)

CONTENTS

Synopsis
Description
Return Values
Example
Author
License

SYNOPSIS

subroutine system_clearenv(ierr)

integer,intent(out),optional :: ierr

DESCRIPTION

The clearenv() procedure clears the environment of all name-value pairs. Typically used in security-conscious applications or ones where configuration control requires ensuring specific variables are set.

RETURN VALUES

ierr returns zero on success, and a nonzero value on failure. Optional. If not present and an error occurs the program stops.

EXAMPLE

Sample program:

     program demo_system_clearenv
     use M_system, only : system_clearenv
     implicit none
     ! environment before clearing
     call execute_command_line(’env|wc’)
     ! environment after clearing (not necessarily blank!!)
     call system_clearenv()
     call execute_command_line(’env’)
     end program demo_system_clearenv

Typical output:

     89     153    7427
     PWD=/home/urbanjs/V600
     SHLVL=1

AUTHOR

John S. Urban

LICENSE

Public Domain


system_clearenv (3) July 05, 2020
Generated by manServer 1.08 from 2f222e06-e832-4b98-b3b4-be4d94b48b47 using man macros.