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


Manual Reference Pages  -  SEARCHPATH (3)

NAME

search - search for named executable

CONTENTS

Synopsis
Description
Source

SYNOPSIS

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

char*   searchpath(char *name)

DESCRIPTION

Searchpath searches for the executable name in the same way that sh(1) and rc(1) 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 open(3) or exec(3).

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

/usr/local/plan9/src/lib9/searchpath.c
Search for    or go to Top of page |  Section 3 |  Main Index


SEARCHPATH (3) -->

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