From 33abb9a781761cbca827e93bf0a06a024ea3bb6b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?=
 <grubba@grubba.org>
Date: Wed, 29 Jan 1997 02:40:31 +0100
Subject: [PATCH] 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
---
 src/modules/system/doc/chroot        | 21 +++++++++++++
 src/modules/system/doc/gethostbyaddr | 19 ++++++++++++
 src/modules/system/doc/gethostbyname | 24 +++++++++++++++
 src/modules/system/doc/gethostname   | 12 ++++++++
 src/modules/system/doc/openlog       | 45 ++++++++++++++++++++++++++++
 src/modules/system/doc/uname         | 21 +++++++++++++
 6 files changed, 142 insertions(+)
 create mode 100644 src/modules/system/doc/chroot
 create mode 100644 src/modules/system/doc/gethostbyaddr
 create mode 100644 src/modules/system/doc/gethostbyname
 create mode 100644 src/modules/system/doc/gethostname
 create mode 100644 src/modules/system/doc/openlog
 create mode 100644 src/modules/system/doc/uname

diff --git a/src/modules/system/doc/chroot b/src/modules/system/doc/chroot
new file mode 100644
index 0000000000..a5f447f9a9
--- /dev/null
+++ b/src/modules/system/doc/chroot
@@ -0,0 +1,21 @@
+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.
diff --git a/src/modules/system/doc/gethostbyaddr b/src/modules/system/doc/gethostbyaddr
new file mode 100644
index 0000000000..1b7db8bc23
--- /dev/null
+++ b/src/modules/system/doc/gethostbyaddr
@@ -0,0 +1,19 @@
+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
+
diff --git a/src/modules/system/doc/gethostbyname b/src/modules/system/doc/gethostbyname
new file mode 100644
index 0000000000..c37c2c93ac
--- /dev/null
+++ b/src/modules/system/doc/gethostbyname
@@ -0,0 +1,24 @@
+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
+
diff --git a/src/modules/system/doc/gethostname b/src/modules/system/doc/gethostname
new file mode 100644
index 0000000000..ec92a89563
--- /dev/null
+++ b/src/modules/system/doc/gethostname
@@ -0,0 +1,12 @@
+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.
diff --git a/src/modules/system/doc/openlog b/src/modules/system/doc/openlog
new file mode 100644
index 0000000000..fe661eebd6
--- /dev/null
+++ b/src/modules/system/doc/openlog
@@ -0,0 +1,45 @@
+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
diff --git a/src/modules/system/doc/uname b/src/modules/system/doc/uname
new file mode 100644
index 0000000000..b75672257c
--- /dev/null
+++ b/src/modules/system/doc/uname
@@ -0,0 +1,21 @@
+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.
+
-- 
GitLab