|
NAMEsearch - search for named executableSYNOPSIS#include <u.h>#include <libc.h> char* searchpath(char *name) DESCRIPTIONSearchpath searches for the executable name in the same way that and do.The environment variable $PATH is treated as a colon-separated list of directories in which to look for name. An empty string in the list is treated as the current directory. If an executable named name is found in one of the directories, searchpath returns a pointer to a malloced string containing a path (dir/name, or simply name) suitable for use in or If name begins with ./ , ../ , or / , then the search path is ignored. If name exists and is an executable, then searchpath returns a malloced string containing name. The returned buffer should be freed when no longer needed. If name is not found, searchpath returns nil. SOURCE/src/lib9/searchpath.c Visit the GSP FreeBSD Man Page Interface. |