indexing
	description: "The objects available from the environment at time of execution"
	status: "See notice at end of class"
	date: "$Date$"
	revision: "$Revision$"

class interface
	EXECUTION_ENVIRONMENT

feature -- Access

	command_line: ARGUMENTS
			-- Command line that was used to start current execution

	current_working_directory: STRING
			-- Directory of current execution
		ensure
			result_not_void: Result /= void

	default_shell: STRING
			-- Default shell

	get (s: STRING): STRING
			-- Value of s if it is an environment variable and has been set;
			-- void otherwise.
		require
			s_exists: s /= void

	home_directory_name: STRING
			-- Directory name corresponding to the home directory.
		require
			home_directory_supported: operating_environment.home_directory_supported

	root_directory_name: STRING
			-- Directory name corresponding to the root directory.
		require
			root_directory_supported: operating_environment.root_directory_supported
		ensure
			result_not_void: Result /= void

feature -- Status setting

	change_working_directory (path: STRING)
			-- Set the current directory to path

	launch (s: STRING)
			-- Pass to the operating system an asynchronous request to
			-- execute s.
			-- If s is empty, use the default shell as command.
		require
			s_not_void: s /= void

	put (value, key: STRING)
			-- Set the environment variable key to value.
		require
			key_exists: key /= void
			key_meaningful: key.count > 0
			value_exists: value /= void
		ensure
			variable_set: (return_code = 0) implies (value.is_equal (get (key)))

	system (s: STRING)
			-- Pass to the operating system a request to execute s.
			-- If s is empty, use the default shell as command.
		require
			s_exists: s /= void

feature -- Status

	return_code: INTEGER
			-- Status code set by last call to system or put

invariant

		-- from ANY
	reflexive_equality: standard_is_equal (Current)
	reflexive_conformance: conforms_to (Current)

indexing
	library: "[
			EiffelBase: Library of reusable components for Eiffel.
	]"
	status: "[
			Copyright 1986-2001 Interactive Software Engineering (ISE).
			For ISE customers the original versions are an ISE product
			covered by the ISE Eiffel license and support agreements.
	]"
	license: "[
			EiffelBase may now be used by anyone as FREE SOFTWARE to
			develop any product, public-domain or commercial, without
			payment to ISE, under the terms of the ISE Free Eiffel Library
			License (IFELL) at http://eiffel.com/products/base/license.html.
	]"
	source: "[
			Interactive Software Engineering Inc.
			ISE Building
			360 Storke Road, Goleta, CA 93117 USA
			Telephone 805-685-1006, Fax 805-685-6869
			Electronic mail <info@eiffel.com>
			Customer support http://support.eiffel.com
	]"
	info: "[
			For latest info see award-winning pages: http://eiffel.com
	]"

end -- class EXECUTION_ENVIRONMENT