Pike v8.0 release 1738

Method Process.search_path()


Method search_path

string search_path(string command)

Description

Search for the path to an executable.

Parameter command

Executable to search for.

Searches for command in the directories listed in the environment variable $PATH.

Returns

Returns the path to command if found, and 0 (zero) on failure.

Note

This function is NOT thread safe if the environment variable $PATH is being changed concurrently.

Note

In Pike 7.8.752 and earlier the environment variable $PATH was only read once.