Skip to content
Snippets Groups Projects
Commit 33abb9a7 authored by Henrik (Grubba) Grubbström's avatar Henrik (Grubba) Grubbström
Browse files

Added some more doc

Rev: src/modules/system/doc/chroot:1.1
Rev: src/modules/system/doc/gethostbyaddr:1.1
Rev: src/modules/system/doc/gethostbyname:1.1
Rev: src/modules/system/doc/gethostname:1.1
Rev: src/modules/system/doc/openlog:1.1
Rev: src/modules/system/doc/uname:1.1
parent 189fd0c6
Branches
No related tags found
No related merge requests found
NAME
chroot - change the root directory
SYNTAX
int chroot(string newroot);
or
int chroot(object(File) obj);
DESCRIPTION
Changes the root directory for this process to the indicated
directory.
NOTA BENE
Since this function modifies the directory structure as seen from
Pike, you have to modify the environment variables PIKE_MODULE_PATH
and PIKE_INCLUDE_PATH to compensate for the new root-directory.
This function only exists on systems that have the chroot(2)
system call.
The second variant only works on systems that also have
the fchroot(2) system call.
NAME
gethostbyaddr - gets information about a host given it's address
SYNTAX
array gethostbyaddr(string addr);
DESCRIPTION
Returns an array with information about the specified IP address.
The returned array contains the same information as that returned
by gethostbyname().
NOTA BENE
This function only exists on systems that have the gethostbyaddr(2)
or similar system call.
SEE ALSO
gethostbyname
NAME
gethostbyname - gets information about a host given it's name
SYNTAX
array gethostbyname(string hostname);
DESCRIPTION
Returns an array with information about the specified host.
The array contains three elements:
The first element is the hostname.
The second element is an array(string) of IP numbers for the host.
The third element is an array(string) of aliases for the host.
NOTA BENE
This function only exists on systems that have the gethostbyname(2)
or similar system call.
SEE ALSO
gethostbyaddr
NAME
gethostname - get the name of this host
SYNTAX
string gethostname();
DESCRIPTION
Returns a string with the name of the host.
NOTA BENE
This function only exists on systems that have the gethostname(2)
or uname(2) system calls.
NAME
openlog - initializes the connection to syslogd
SYNTAX
void openlog(string ident, int options, facility);
DESCRIPTION
Initializes the connection to syslogd.
The 'ident' argument specifies an identifier to tag all logentries
with.
'options' is a bitfield specifying the behaviour of the message
logging. Valid options are:
LOG_PID Log the process ID with each message.
LOG_CONS Write messages to the console if they can't be sent to syslogd.
LOG_NDELAY Open the connection to syslogd now and not later.
LOG_NOWAIT Do not wait for subprocesses talking to syslogd.
'facility' specifies what subsystem you want to log as. Valid
facilities are:
LOG_AUTH Authorization subsystem
LOG_AUTHPRIV
LOG_CRON Crontab subsystem
LOG_DAEMON System daemons
LOG_KERN Kernel subsystem (NOT USABLE)
LOG_LOCAL For local use
LOG_LOCAL[1-7] For local use
LOG_LPR Line printer spooling system
LOG_MAIL Mail subsystem
LOG_NEWS Network news subsystem
LOG_SYSLOG
LOG_USER
LOG_UUCP UUCP subsystem
NOTA BENE
Only available on systems with syslog(3).
BUGS
LOG_NOWAIT should probably always be specified.
SEE ALSO
syslog, closelog, setlogmask
NAME
uname - get operating system information
SYNTAX
mapping(string:string) uname();
DESCRIPTION
Returns a mapping describing the operating system.
The mapping contains the following fields:
"sysname": Operating system name
"nodename": Host name
"release": Release of this OS
"version": Version number of this OS
"machine": Machine architecture
NOTA BENE
This function only exists on systems that have the uname(2)
system call.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment