GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
SEARCHPATH(3) FreeBSD Library Functions Manual SEARCHPATH(3)

search - search for named executable

#include <u.h>
#include <libc.h>

char* searchpath(char *name)

Searchpath 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.

/src/lib9/searchpath.c

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.