Index: trunk/minix/man/man2/access.2
===================================================================
--- trunk/minix/man/man2/access.2	(revision 9)
+++ 	(revision )
@@ -1,109 +1,0 @@
-.\" Copyright (c) 1980 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)access.2	6.5 (Berkeley) 5/22/86
-.\"
-.TH ACCESS 2 "May 22, 1986"
-.UC 4
-.SH NAME
-access \- determine accessibility of file
-.SH SYNOPSIS
-.ft B
-.nf
-#include <sys/types.h>
-#include <unistd.h>
-.PP
-.ft B
-.ta 1.25i 1.6i
-.nf
-#define R_OK	4	/* test for read permission */
-#define W_OK	2	/* test for write permission */
-#define X_OK	1	/* test for execute (search) permission */
-#define F_OK	0	/* test for presence of file */
-.PP
-.ft B
-.nf
-int access(const char *\fIpath\fP, mode_t \fImode\fP)
-.ft R
-.fi
-.SH DESCRIPTION
-.B Access
-checks the given
-file
-.I path
-for accessibility according to
-.IR mode ,
-which is an inclusive or of the bits
-.BR R_OK ,
-.BR W_OK
-and
-.BR X_OK .
-Specifying
-.I mode
-as
-.B F_OK
-(i.e., 0)
-tests whether the directories leading to the file can be
-searched and the file exists.
-.PP
-The real user ID and the group access list
-(including the real group ID) are
-used in verifying permission, so this call
-is useful to set-UID programs.
-.PP
-Notice that only access bits are checked.
-A directory may be indicated as writable by
-.BR access ,
-but an attempt to open it for writing will fail
-(although files may be created there);
-a file may look executable, but
-.B execve
-will fail unless it is in proper format.
-.SH "RETURN VALUE
-If
-.I path
-cannot be found or if any of the desired access modes would
-not be granted, then a \-1 value is returned; otherwise
-a 0 value is returned.
-.SH "ERRORS
-Access to the file is denied if one or more of the following are true:
-.TP 15
-[ENOTDIR]
-A component of the path prefix is not a directory.
-.TP 15
-[ENAMETOOLONG]
-The path name exceeds PATH_MAX characters.
-.TP 15
-[ENOENT]
-The named file does not exist.
-.TP 15
-[EACCES]
-Search permission is denied for a component of the path prefix.
-.TP 15
-[ELOOP]
-Too many symbolic links were encountered in translating the pathname.
-(Minix-vmd)
-.TP 15
-[EROFS]
-Write access is requested for a file on a read-only file system.
-.TP 15
-[EACCES]
-Permission bits of the file mode do not permit the requested
-access, or search permission is denied on a component of the
-path prefix.  The owner of a file has permission checked with
-respect to the ``owner'' read, write, and execute mode bits,
-members of the file's group other than the owner have permission
-checked with respect to the ``group'' mode bits, and all
-others have permissions checked with respect to the ``other''
-mode bits.
-.TP 15
-[EFAULT]
-.I Path
-points outside the process's allocated address space.
-.TP 15
-[EIO]
-An I/O error occurred while reading from or writing to the file system.
-.SH "SEE ALSO
-.BR chmod (2),
-.BR stat (2).
Index: trunk/minix/man/man2/alarm.2
===================================================================
--- trunk/minix/man/man2/alarm.2	(revision 9)
+++ 	(revision )
@@ -1,38 +1,0 @@
-.\" Copyright (c) 1980 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)alarm.3c	6.3 (Berkeley) 5/27/86
-.\"
-.TH ALARM 2  "May 27, 1986"
-.UC 4
-.SH NAME
-alarm \- schedule signal after specified time
-.SH SYNOPSIS
-.nf
-.ft B
-#include <unistd.h>
-
-unsigned int alarm(unsigned int \fIseconds\fP)
-.ft R
-.fi
-.SH DESCRIPTION
-.B Alarm
-causes signal SIGALRM, see
-.BR sigaction (2),
-to be sent to the invoking process
-in a number of seconds given by the argument.
-Unless caught or ignored, the signal terminates the process.
-.PP
-Alarm requests are not stacked; successive calls reset the alarm clock.
-If the argument is 0, any alarm request is canceled.
-Because of scheduling delays,
-resumption of execution of when the signal is
-caught may be delayed an arbitrary amount.
-.PP
-The return value is the amount of time previously remaining in the alarm clock.
-.SH "SEE ALSO"
-.BR pause (2),
-.BR sigsuspend (2),
-.BR sigaction (2),
-.BR sleep (3).
Index: trunk/minix/man/man2/brk.2
===================================================================
--- trunk/minix/man/man2/brk.2	(revision 9)
+++ 	(revision )
@@ -1,86 +1,0 @@
-.\" Copyright (c) 1980 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)brk.2	6.3 (Berkeley) 5/22/86
-.\"
-.TH BRK 2 "May 22, 1986"
-.UC 4
-.SH NAME
-brk, sbrk \- change data segment size
-.SH SYNOPSIS
-.nf
-#include <unistd.h>
-.PP
-.ft B
-int brk(char *\fIaddr\fP)
-.PP
-.ft B
-char *sbrk(int \fIincr\fP)
-.fi
-.SH DESCRIPTION
-.B Brk
-sets the system's idea of the lowest data segment 
-location not used by the program (called the break)
-to
-.IR addr .
-Locations greater than
-.I addr
-and below the stack pointer
-are not in the address space and will thus
-cause a memory violation if accessed.
-.PP
-In the alternate function
-.BR sbrk ,
-.I incr
-more bytes are added to the
-program's data space and a pointer to the
-start of the new area is returned.
-.PP
-When a program begins execution via
-.B execve
-the break is set at the
-highest location defined by the program
-and data storage areas.
-Ordinarily, therefore, only programs with growing
-data areas need to use
-.BR sbrk .
-.SH "RETURN VALUE
-The address of the new break is returned if
-.B brk
-succeeds;
-.B \-1
-if the program requests more
-memory than the system limit.
-.B Sbrk
-returns
-.B \-1
-if the break could not be set.
-.SH ERRORS
-.B Sbrk
-will fail and no additional memory will be allocated if
-one of the following are true:
-.TP 15
-[ENOMEM]
-The maximum possible size of a data segment (as set by
-.BR chmem (1))
-was exceeded.
-.TP 15
-[ENOMEM]
-Insufficient virtual memory space existed
-to support the expansion.  (Minix-vmd)
-.SH "SEE ALSO"
-.BR chmem (1),
-.BR execve (2),
-.BR malloc (3),
-.BR end (3).
-.SH NOTES
-Minix-vmd rounds a small data segment limit up to 3 megabytes.
-.SH BUGS
-Setting the break may fail due to a temporary lack of
-virtual memory under Minix-vmd.  It is not possible to distinguish this
-from a failure caused by exceeding the maximum size of
-the data segment.
-
-.\"
-.\" $PchId: brk.2,v 1.2 2000/08/11 20:05:51 philip Exp $
Index: trunk/minix/man/man2/chdir.2
===================================================================
--- trunk/minix/man/man2/chdir.2	(revision 9)
+++ 	(revision )
@@ -1,66 +1,0 @@
-.\" Copyright (c) 1980 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)chdir.2	6.3 (Berkeley) 8/26/85
-.\"
-.TH CHDIR 2 "August 26, 1985"
-.UC 4
-.SH NAME
-chdir, fchdir \- change current working directory
-.SH SYNOPSIS
-.nf
-.ft B
-#include <unistd.h>
-
-int chdir(const char *\fIpath\fP)
-int fchdir(int \fIfd\fP)
-.ft R
-.fi
-.SH DESCRIPTION
-.I Path
-is the pathname of a directory.
-.I Fd
-is the file descriptor of a directory.
-
-.B Chdir
-causes this directory
-to become the current working directory,
-the starting point for path names not beginning with ``/''.
-.PP
-In order for a directory to become the current directory,
-a process must have execute (search) access to the directory.
-.SH "RETURN VALUE
-Upon successful completion, a value of 0 is returned.
-Otherwise, a value of \-1 is returned and \fBerrno\fP is set to indicate
-the error.
-.SH ERRORS
-.B Chdir
-will fail and the current working directory will be unchanged if
-one or more of the following are true:
-.TP 15
-[ENOTDIR]
-A component of the path prefix is not a directory.
-.TP 15
-[ENAMETOOLONG]
-The path name exceeds PATH_MAX characters.
-.TP 15
-[ENOENT]
-The named directory does not exist.
-.TP 15
-[ELOOP]
-Too many symbolic links were encountered in translating the pathname.
-(Minix-vmd)
-.TP 15
-[EACCES]
-Search permission is denied for any component of
-the path name.
-.TP 15
-[EFAULT]
-.I Path
-points outside the process's allocated address space.
-.TP 15
-[EIO]
-An I/O error occurred while reading from or writing to the file system.
-.SH "SEE ALSO"
-.BR chroot (2).
Index: trunk/minix/man/man2/chmod.2
===================================================================
--- trunk/minix/man/man2/chmod.2	(revision 9)
+++ 	(revision )
@@ -1,132 +1,0 @@
-.\" Copyright (c) 1980 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)chmod.2	6.5 (Berkeley) 5/13/86
-.\"
-.TH CHMOD 2 "May 13, 1986"
-.UC 4
-.SH NAME
-chmod \- change mode of file
-.SH SYNOPSIS
-.nf
-.ft B
-#include <sys/types.h>
-#include <sys/stat.h>
-
-int chmod(const char *\fIpath\fP, mode_t \fImode\fP)
-.ig \" You never know
-.PP
-.ft B
-int fchmod(int \fIfd\fP, mode_t \fImode\fP)
-..
-.fi
-.SH DESCRIPTION
-The file whose name
-is given by \fIpath\fP
-.ig
-or referenced by the descriptor
-.I fd
-..
-has its mode changed to
-.IR mode .
-Modes are constructed by
-.IR or 'ing
-together some
-combination of the following, defined in
-.IR <sys/stat.h> :
-.PP
-.RS
-.nf
-.ta \w'S_ISUID\ \ 'u +\w'04000\ \ \ 'u
-S_ISUID	04000	set user ID on execution
-S_ISGID	02000	set group ID on execution
-S_ISVTX	01000	`sticky bit' (see below)
-S_IRWXU	00700	read, write, execute by owner
-S_IRUSR	00400	read by owner
-S_IWUSR	00200	write by owner
-S_IXUSR	00100	execute (search on directory) by owner
-S_IRWXG	00070	read, write, execute by group
-S_IRGRP	00040	read by group
-S_IWGRP	00020	write by group
-S_IXGRP	00010	execute (search on directory) by group
-S_IRWXO	00007	read, write, execute by others
-S_IROTH	00004	read by others
-S_IWOTH	00002	write by others
-S_IXOTH	00001	execute (search on directory) by others
-.fi
-.RE
-.PP
-If mode ISVTX (the `sticky bit') is set on a directory,
-an unprivileged user may not delete or rename
-files of other users in that directory.  (Minix-vmd)
-.PP
-Only the owner of a file (or the super-user) may change the mode.
-.PP
-Writing or changing the owner of a file
-turns off the set-user-id and set-group-id bits
-unless the user is the super-user.
-This makes the system somewhat more secure
-by protecting set-user-id (set-group-id) files
-from remaining set-user-id (set-group-id) if they are modified,
-at the expense of a degree of compatibility.
-.SH "RETURN VALUE
-Upon successful completion, a value of 0 is returned.
-Otherwise, a value of \-1 is returned and
-.B errno
-is set to indicate the error.
-.SH "ERRORS
-.B Chmod
-will fail and the file mode will be unchanged if:
-.TP 15
-[ENOTDIR]
-A component of the path prefix is not a directory.
-.TP 15
-[ENAMETOOLONG]
-The path name exceeds PATH_MAX characters.
-.TP 15
-[ENOENT]
-The named file does not exist.
-.TP 15
-[EACCES]
-Search permission is denied for a component of the path prefix.
-.TP 15
-[ELOOP]
-Too many symbolic links were encountered in translating the pathname.
-(Minix-vmd)
-.TP 15
-[EPERM]
-The effective user ID does not match the owner of the file and
-the effective user ID is not the super-user.
-.TP 15
-[EROFS]
-The named file resides on a read-only file system.
-.TP 15
-[EFAULT]
-.I Path
-points outside the process's allocated address space.
-.TP 15
-[EIO]
-An I/O error occurred while reading from or writing to the file system.
-.ig
-.PP
-.I Fchmod
-will fail if:
-.TP 15
-[EBADF]
-The descriptor is not valid.
-.TP 15
-[EROFS]
-The file resides on a read-only file system.
-.TP 15
-[EIO]
-An I/O error occurred while reading from or writing to the file system.
-..
-.SH "SEE ALSO"
-.BR chmod (1),
-.BR open (2),
-.BR chown (2),
-.BR stat (2).
-.SH NOTES
-The sticky bit was historically used to lock important executables into
-memory.
Index: trunk/minix/man/man2/chown.2
===================================================================
--- trunk/minix/man/man2/chown.2	(revision 9)
+++ 	(revision )
@@ -1,102 +1,0 @@
-.\" Copyright (c) 1980 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)chown.2	6.6 (Berkeley) 5/22/86
-.\"
-.TH CHOWN 2 "May 22, 1986"
-.UC 4
-.SH NAME
-chown \- change owner and group of a file
-.SH SYNOPSIS
-.nf
-.ft B
-int chown(const char *\fIpath\fP, int \fIowner\fP, int \fIgroup\fP)
-.ig \" You never know
-.PP
-.ft B
-int fchown(int \fIfd\fP, int \fIowner\fP, int \fIgroup\fP)
-..
-.fi
-.SH DESCRIPTION
-The file
-that is named by \fIpath\fP
-.ig
-or referenced by \fIfd\fP
-..
-has its
-.I owner
-and 
-.I group
-changed as specified.
-Only the super-user
-may change the owner of the file,
-because if users were able to give files away,
-they could defeat file-space accounting procedures.
-The owner of the file may change the group
-to a group of which he is a member.
-.PP
-On some systems,
-.I chown
-clears the set-user-id and set-group-id bits
-on the file
-to prevent accidental creation of
-set-user-id and set-group-id programs.
-.SH "RETURN VALUE
-Zero is returned if the operation was successful;
-\-1 is returned if an error occurs, with a more specific
-error code being placed in the global variable \fBerrno\fP.
-.SH "ERRORS
-.B Chown
-will fail and the file will be unchanged if:
-.TP 15
-[ENOTDIR]
-A component of the path prefix is not a directory.
-.TP 15
-[ENAMETOOLONG]
-The path name exceeds PATH_MAX characters.
-.TP 15
-[ENOENT]
-The named file does not exist.
-.TP 15
-[EACCES]
-Search permission is denied for a component of the path prefix.
-.TP 15
-[ELOOP]
-Too many symbolic links were encountered in translating the pathname.
-(Minix-vmd)
-.TP 15
-[EPERM]
-The effective user ID is not the super-user.
-.TP 15
-[EROFS]
-The named file resides on a read-only file system.
-.TP 15
-[EFAULT]
-.I Path
-points outside the process's allocated address space.
-.TP 15
-[EIO]
-An I/O error occurred while reading from or writing to the file system.
-.ig
-.PP
-.B Fchown
-will fail if:
-.TP 15
-[EBADF]
-.I Fd
-does not refer to a valid descriptor.
-.TP 15
-[EPERM]
-The effective user ID is not the super-user.
-.TP 15
-[EROFS]
-The named file resides on a read-only file system.
-.TP 15
-[EIO]
-An I/O error occurred while reading from or writing to the file system.
-..
-.SH "SEE ALSO"
-.BR chown (8),
-.BR chgrp (1),
-.BR chmod (2).
Index: trunk/minix/man/man2/chroot.2
===================================================================
--- trunk/minix/man/man2/chroot.2	(revision 9)
+++ 	(revision )
@@ -1,62 +1,0 @@
-.\" Copyright (c) 1983 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)chroot.2	6.3 (Berkeley) 8/26/85
-.\"
-.TH CHROOT 2 "August 26, 1985"
-.UC 5
-.SH NAME
-chroot \- change root directory
-.SH SYNOPSIS
-.nf
-.ft B
-#include <unistd.h>
-
-int chroot(const char *\fIdirname\fP)
-.ft R
-.fi
-.SH DESCRIPTION
-.I Dirname
-is the address of the pathname of a directory, terminated by a null byte.
-.B Chroot
-causes this directory
-to become the root directory,
-the starting point for path names beginning with ``/''.
-.PP
-In order for a directory to become the root directory
-a process must have execute (search) access to the directory.
-.PP
-This call is restricted to the super-user.
-.SH "RETURN VALUE
-Upon successful completion, a value of 0 is returned.  Otherwise,
-a value of \-1 is returned and \fBerrno\fP is set to indicate an error.
-.SH ERRORS
-.B Chroot
-will fail and the root directory will be unchanged if
-one or more of the following are true:
-.TP 15
-[ENOTDIR]
-A component of the path name is not a directory.
-.TP 15
-[ENAMETOOLONG]
-The path name exceeds PATH_MAX characters.
-.TP 15
-[ENOENT]
-The named directory does not exist.
-.TP 15
-[EACCES]
-Search permission is denied for any component of the path name.
-.TP 15
-[ELOOP]
-Too many symbolic links were encountered in translating the pathname.
-(Minix-vmd)
-.TP 15
-[EFAULT]
-.I Path
-points outside the process's allocated address space.
-.TP 15
-[EIO]
-An I/O error occurred while reading from or writing to the file system.
-.SH "SEE ALSO"
-.BR chdir (2).
Index: trunk/minix/man/man2/close.2
===================================================================
--- trunk/minix/man/man2/close.2	(revision 9)
+++ 	(revision )
@@ -1,84 +1,0 @@
-.\" Copyright (c) 1980 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)close.2	6.3 (Berkeley) 5/22/86
-.\"
-.TH CLOSE 2 "May 22, 1986"
-.UC 4
-.SH NAME
-close \- delete a descriptor
-.SH SYNOPSIS
-.nf
-.ft B
-#include <unistd.h>
-
-int close(int \fId\fP)
-.ft R
-.fi
-.SH DESCRIPTION
-The
-.B close
-call deletes a descriptor from the per-process object
-reference table.
-If this is the last reference to the underlying object, then
-it will be deactivated.
-For example, on the last close of a file
-the current \fIseek\fP pointer associated with the file is lost;
-on the last close of a TCP/IP descriptor
-associated naming information and queued data are discarded;
-on the last close of a file holding an advisory lock
-the lock is released (see further
-.BR fcntl (2)).
-.PP
-A close of all of a process's descriptors is automatic on
-.IR exit ,
-but since
-there is a limit on the number of active descriptors per process,
-.B close
-is necessary for programs that deal with many descriptors.
-.PP
-When a process forks (see
-.BR fork (2)),
-all descriptors for the new child process reference the same
-objects as they did in the parent before the fork.
-If a new process is then to be run using
-.BR execve (2),
-the process would normally inherit these descriptors.  Most
-of the descriptors can be rearranged with
-.BR dup2 (2)
-or deleted with
-.B close
-before the
-.B execve
-is attempted, but if some of these descriptors will still
-be needed if the
-.B execve
-fails, it is necessary to arrange for them to be closed if the
-.B execve
-succeeds.
-For this reason, the call ``fcntl(d, F_SETFD, \fIflags\fR)'' is provided,
-that can be used to mark a descriptor "close on exec" by setting
-the
-.B FD_CLOEXEC
-flag:
-.PP
-.RS
-fcntl(d, F_SETFD, fcntl(d, F_GETFD) | FD_CLOEXEC);
-.RE
-.SH "RETURN VALUE
-Upon successful completion, a value of 0 is returned.
-Otherwise, a value of \-1 is returned and the global integer variable
-.B errno
-is set to indicate the error.
-.SH ERRORS
-.B Close
-will fail if:
-.TP 15
-[EBADF]
-\fID\fP is not an active descriptor.
-.SH "SEE ALSO"
-.BR open (2),
-.BR pipe (2),
-.BR execve (2),
-.BR fcntl (2).
Index: trunk/minix/man/man2/creat.2
===================================================================
--- trunk/minix/man/man2/creat.2	(revision 9)
+++ 	(revision )
@@ -1,142 +1,0 @@
-.\" Copyright (c) 1980 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)creat.2	6.6 (Berkeley) 5/22/86
-.\"
-.TH CREAT 2 "May 22, 1986"
-.UC 4
-.SH NAME
-creat \- create a new file
-.SH SYNOPSIS
-.nf
-.ft B
-#include <sys/types.h>
-#include <fcntl.h>
-
-int creat(const char *\fIname\fP, mode_t \fImode\fP)
-.ft R
-.fi
-.SH DESCRIPTION
-.ft B
-This interface is made obsolete by open(2), it is equivalent to
-.ft R
-.PP
-.RS
-open(\fIname\fP, O_WRONLY | O_CREAT | O_TRUNC, \fImode\fP)
-.RE
-.PP
-.B Creat
-creates a new file or prepares to rewrite an existing
-file called 
-.IR name ,
-given as the address of a null-terminated string.
-If the file did not exist, it is given
-mode
-.IR mode ,
-as modified by the process's mode mask (see
-.BR umask (2)).
-Also see
-.BR chmod (2)
-for the
-construction of the
-.I mode
-argument.
-.PP
-If the file did exist, its mode and owner remain unchanged
-but it is truncated to 0 length.
-.PP
-The file is also opened for writing, and its file descriptor
-is returned.
-.SH NOTES
-The
-.I mode
-given is arbitrary; it need not allow
-writing.
-This feature has been used in the past by
-programs to construct a simple, exclusive locking
-mechanism.  It is replaced by the O_EXCL open
-mode, or the advisory locking of the
-.BR fcntl (2)
-facility.  
-.SH "RETURN VALUE
-The value \-1 is returned if an error occurs.  Otherwise,
-the call returns a non-negative descriptor that only permits
-writing.
-.SH ERRORS
-.I Creat
-will fail and the file will not be created or truncated
-if one of the following occur:
-.TP 15
-[ENOTDIR]
-A component of the path prefix is not a directory.
-.TP 15
-[ENAMETOOLONG]
-The path name exceeds PATH_MAX characters.
-.TP 15
-[ENOENT]
-The named file does not exist.
-.TP 15
-[ELOOP]
-Too many symbolic links were encountered in translating the pathname.
-(Minix-vmd)
-.TP 15
-[EACCES]
-Search permission is denied for a component of the path prefix.
-.TP 15
-[EACCES]
-The file does not exist and the directory
-in which it is to be created is not writable.
-.TP 15
-[EACCES]
-The file exists, but it is unwritable.
-.TP 15
-[EISDIR]
-The file is a directory.
-.TP 15
-[EMFILE]
-There are already too many files open.
-.TP 15
-[ENFILE]
-The system file table is full.
-.TP 15
-[ENOSPC]
-The directory in which the entry for the new file is being placed
-cannot be extended because there is no space left on the file
-system containing the directory.
-.TP 15
-[ENOSPC]
-There are no free inodes on the file system on which the
-file is being created.
-.ig
-.TP 15
-[EDQUOT]
-The directory in which the entry for the new file
-is being placed cannot be extended because the
-user's quota of disk blocks on the file system
-containing the directory has been exhausted.
-.TP 15
-[EDQUOT]
-The user's quota of inodes on the file system on
-which the file is being created has been exhausted.
-..
-.TP 15
-[EROFS]
-The named file resides on a read-only file system.
-.TP 15
-[ENXIO]
-The file is a character special or block special file, and
-the associated device does not exist.
-.TP 15
-[EIO]
-An I/O error occurred while making the directory entry or allocating the inode.
-.TP 15
-[EFAULT]
-.I Name
-points outside the process's allocated address space.
-.SH "SEE ALSO"
-.BR open (2),
-.BR write (2),
-.BR close (2),
-.BR chmod (2),
-.BR umask (2).
Index: trunk/minix/man/man2/dup.2
===================================================================
--- trunk/minix/man/man2/dup.2	(revision 9)
+++ 	(revision )
@@ -1,86 +1,0 @@
-.\" Copyright (c) 1980 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)dup.2	6.3 (Berkeley) 5/13/86
-.\"
-.TH DUP 2 "May 13, 1986"
-.UC 4
-.SH NAME
-dup, dup2 \- duplicate a descriptor
-.SH SYNOPSIS
-.nf
-.ft B
-#include <unistd.h>
-
-int dup(int \fIoldd\fP)
-int dup2(int \fIoldd\fP, int \fInewd\fP)
-.SH DESCRIPTION
-.B Dup
-duplicates an existing descriptor.
-The argument \fIoldd\fP is a small non-negative integer index in
-the per-process descriptor table.  The value must be less
-than OPEN_MAX, the size of the table.
-The new descriptor returned by the call, let's name it
-.I newd,
-is the lowest numbered descriptor that is
-not currently in use by the process.
-.PP
-The object referenced by the descriptor does not distinguish
-between references using \fIoldd\fP and \fInewd\fP in any way.
-Thus if \fInewd\fP and \fIoldd\fP are duplicate references to an open
-file,
-.BR read (2),
-.BR write (2)
-and
-.BR lseek (2)
-calls all move a single pointer into the file,
-and append mode, non-blocking I/O and asynchronous I/O options
-are shared between the references.
-If a separate pointer into the file is desired, a different
-object reference to the file must be obtained by issuing an
-additional
-.BR open (2)
-call.
-The close-on-exec flag on the new file descriptor is unset.
-.PP
-In the second form of the call, the value of
-.IR newd
-desired is specified.  If this descriptor is already
-in use, the descriptor is first deallocated as if a
-.BR close (2)
-call had been done first.
-.I Newd
-is not closed if it equals
-.IR oldd .
-.SH "RETURN VALUE
-The value \-1 is returned if an error occurs in either call.
-The external variable
-.B errno
-indicates the cause of the error.
-.SH "ERRORS
-.B Dup
-and
-.B dup2
-fail if:
-.TP 15
-[EBADF]
-\fIOldd\fP or
-\fInewd\fP is not a valid active descriptor
-.TP 15
-[EMFILE]
-Too many descriptors are active.
-.SH NOTES
-.B Dup
-and
-.B dup2
-are now implemented using the
-.B F_DUPFD
-function of
-.BR fcntl (2),
-although the old system call interfaces still exist to support old programs.
-.SH "SEE ALSO"
-.BR open (2),
-.BR close (2),
-.BR fcntl (2),
-.BR pipe (2).
Index: trunk/minix/man/man2/execve.2
===================================================================
--- trunk/minix/man/man2/execve.2	(revision 9)
+++ 	(revision )
@@ -1,206 +1,0 @@
-.\" Copyright (c) 1980 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)execve.2	6.7 (Berkeley) 5/22/86
-.\"
-.TH EXECVE 2 "May 22, 1986"
-.UC 4
-.SH NAME
-execve \- execute a file
-.SH SYNOPSIS
-.nf
-.ft B
-#include <unistd.h>
-
-int execve(const char *\fIname\fP, char *const \fIargv\fP[], char *const \fIenvp\fP[])
-.ft R
-.fi
-.SH DESCRIPTION
-.B Execve
-transforms the calling process into a new process.
-The new process is constructed from an ordinary file
-called the \fInew process file\fP.
-This file is either an executable object file,
-or a file of data for an interpreter.
-An executable object file consists of an identifying header,
-followed by pages of data representing the initial program (text)
-and initialized data pages.  Additional pages may be specified
-by the header to be initialized with zero data.  See
-.BR a.out (5).
-.PP
-An interpreter file begins with a line of the form ``#! \fIinterpreter\fP''.
-When an interpreter file is
-.BR execve\| 'd,
-the system \fBexecve\fP\|'s the specified \fIinterpreter\fP, giving
-it the name of the originally exec'd file as an argument and
-shifting over the rest of the original arguments.
-.PP
-There can be no return from a successful \fBexecve\fP because the calling
-core image is lost.
-This is the mechanism whereby different process images become active.
-.PP
-The argument \fIargv\fP is a null-terminated array of character pointers
-to null-terminated character strings.  These strings constitute
-the argument list to be made available to the new
-process.  By convention, at least one argument must be present in
-this array, and the first element of this array should be
-the name of the executed program (i.e., the last component of \fIname\fP).
-.PP
-The argument \fIenvp\fP is also a null-terminated array of character pointers
-to null-terminated strings.  These strings pass information to the
-new process that is not directly an argument to the command (see
-.BR environ (7)).
-.PP
-Descriptors open in the calling process remain open in
-the new process, except for those for which the close-on-exec
-flag is set (see
-.BR close (2)).
-Descriptors that remain open are unaffected by
-.BR execve .
-.PP
-Ignored signals remain ignored across an
-.BR execve ,
-but signals that are caught are reset to their default values.
-Blocked signals remain blocked regardless of changes to the signal action.
-The signal stack is reset to be undefined (see
-.BR sigaction (2) 
-for more information).
-.PP
-Each process has
-.I real
-user and group IDs and an
-.I effective
-user and group IDs.  The
-.I real
-ID identifies the person using the system; the
-.I effective
-ID determines his access privileges.
-.B Execve
-changes the effective user and group ID to
-the owner of the executed file if the file has the \*(lqset-user-ID\*(rq
-or \*(lqset-group-ID\*(rq modes.  The
-.I real
-user ID is not affected.
-.PP
-The new process also inherits the following attributes from
-the calling process:
-.PP
-.in +5n
-.nf
-.ta +2i
-process ID	see \fBgetpid\fP\|(2)
-parent process ID	see \fBgetppid\fP\|(2)
-process group ID	see \fBgetpgrp\fP\|(2)
-access groups	see \fBgetgroups\fP\|(2)
-working directory	see \fBchdir\fP\|(2)
-root directory	see \fBchroot\fP\|(2)
-control terminal	see \fBtty\fP\|(4)
-alarm timer	see \fBalarm\fP\|(2)
-file mode mask	see \fBumask\fP\|(2)
-signal mask	see \fBsigaction\fP\|(2), \fBsigprocmask\fP\|(2)
-.in -5n
-.fi
-.PP
-When the executed program begins, it is called as follows:
-.PP
-.RS
-.ft B
-.nf
-int main(int \fIargc\fP, char *const \fIargv\fP[], char *const \fIenvp\fP[]);
-
-exit(main(\fIargc\fP, \fIargv\fP, \fIenvp\fP));
-.fi
-.ft R
-.RE
-.PP
-where
-.I argc
-is the number of elements in \fIargv\fP
-(the ``arg count'')
-and
-.I argv
-is the array of character pointers
-to the arguments themselves.
-.PP
-.I Envp
-is a pointer to an array of strings that constitute
-the
-.I environment
-of the process.
-A pointer to this array is also stored in the global variable ``environ''.
-Each string consists of a name, an \*(lq=\*(rq, and a null-terminated value.
-The array of pointers is terminated by a null pointer.
-The shell
-.BR sh (1)
-passes an environment entry for each global shell variable
-defined when the program is called.
-See
-.BR environ (7)
-for some conventionally
-used names.
-.SH "RETURN VALUE
-If
-.B execve
-returns to the calling process an error has occurred; the
-return value will be \-1 and the global variable
-.B errno
-will contain an error code.
-.SH ERRORS
-.B Execve
-will fail and return to the calling process if one or more
-of the following are true:
-.TP 15
-[ENOTDIR]
-A component of the path prefix is not a directory.
-.TP 15
-[ENAMETOOLONG]
-The path name exceeds PATH_MAX characters.
-.TP 15
-[ENOENT]
-The new process file does not exist.
-.TP 15
-[ELOOP]
-Too many symbolic links were encountered in translating the pathname.
-(Minix-vmd)
-.TP 15
-[EACCES]
-Search permission is denied for a component of the path prefix.
-.TP 15
-[EACCES]
-The new process file is not an ordinary file.
-.TP 15
-[EACCES]
-The new process file mode denies execute permission.
-.TP 15
-[ENOEXEC]
-The new process file has the appropriate access
-permission, but has an invalid magic number in its header.
-.TP 15
-[ENOMEM]
-The new process requires more (virtual) memory than
-is currently available.
-.TP 15
-[E2BIG]
-The number of bytes in the new process's argument list
-is larger than the system-imposed limit ARG_MAX.
-The limit in the system as released is 4096 bytes for
-16-bit MINIX 3, 16384 bytes for 32-bit Minix, and unlimited for Minix-vmd.
-.TP 15
-[EFAULT]
-\fIPath\fP\|, \fIargv\fP\|, or \fIenvp\fP point
-to an illegal address.
-.TP 15
-[EIO]
-An I/O error occurred while reading from the file system.
-.SH CAVEATS
-If a program is
-.I setuid
-to a non-super-user, but is executed when
-the real \fBuid\fP is ``root'', then the program has some of the powers
-of a super-user as well.
-.SH "SEE ALSO"
-.BR exit (2),
-.BR fork (2),
-.BR execl (3),
-.BR environ (7).
Index: trunk/minix/man/man2/exit.2
===================================================================
--- trunk/minix/man/man2/exit.2	(revision 9)
+++ 	(revision )
@@ -1,57 +1,0 @@
-.\" Copyright (c) 1980 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)exit.2	6.4 (Berkeley) 5/22/86
-.\"
-.TH EXIT 2 "May 22, 1986"
-.UC 4
-.SH NAME
-exit, _exit \- terminate a process
-.SH SYNOPSIS
-.nf
-.ft B
-void _exit(int \fIstatus\fP)
-.fi
-.SH DESCRIPTION
-.de SP
-.if t .sp 0.4
-.if n .sp
-..
-.B _exit
-terminates a process with the following consequences:
-.RS
-.SP
-All of the descriptors open in the calling process are closed.
-This may entail delays, for example, waiting for output to drain;
-a process in this state may not be killed, as it is already dying.
-.SP
-If the parent process of the calling process is executing a
-.B wait
-or is interested in the SIGCHLD signal (Minix-vmd),
-then it is notified of the calling process's termination and
-the low-order eight bits of \fIstatus\fP are made available to it;
-see
-.BR wait (2).
-.SP
-The parent process ID of all of the calling process's existing child
-processes are also set to 1.  This means that the initialization process
-(see 
-.BR intro (2))
-inherits each of these processes as well.
-.ig
-Any stopped children are restarted with a hangup signal (SIGHUP).
-..
-.RE
-.PP
-Most C programs call the library routine
-.BR exit (3),
-which performs cleanup actions in the standard I/O library before
-calling \fI_exit\fP\|.
-.SH "RETURN VALUE"
-This call never returns.
-.SH "SEE ALSO"
-.BR fork (2),
-.BR sigaction (2),
-.BR wait (2),
-.BR exit (3).
Index: trunk/minix/man/man2/fcntl.2
===================================================================
--- trunk/minix/man/man2/fcntl.2	(revision 9)
+++ 	(revision )
@@ -1,262 +1,0 @@
-.TH FCNTL 2
-.SH NAME
-fcntl \- miscellaneous file descriptor control functions
-.SH SYNOPSIS
-.nf
-.ft B
-#include <fcntl.h>
-
-int fcntl(int \fIfd\fP, int \fIcmd\fP, \fR[\fP\fIdata\fP\fR]\fP)
-.ft P
-.fi
-.SH DESCRIPTION
-.de SP
-.if t .sp 0.4
-.if n .sp
-..
-.B Fcntl()
-performs several file descriptor related functions, like duplicating a file
-descriptor, setting the "close on exec" attribute, etc.  The
-.I fd
-argument is the file descriptor to operate on,
-.I cmd
-is the command code of the operation to perform, and
-.I data
-is an optional argument to give or receive parameters.  The command
-codes and other symbols and types are declared in <fcntl.h>.  The commands
-are:
-.SP
-.BI "fcntl(" fd ", F_DUPFD, int " fd2 ")"
-.RS
-Returns a new file descriptor that is a duplicate of file descriptor
-.IR fd .
-It shares the same file pointer and the same file status flags, but has
-separate file descriptor flags that are initially off.  The value of the
-duplicate file descriptor is the first free file descriptor greater than
-or equal to
-.IR fd2 .
-.RE
-.SP
-.BI "fcntl(" fd ", F_GETFD)"
-.RS
-Returns the file descriptor flags associated with file descriptor
-.IR fd .
-The flags are the "close on exec" flag
-.B FD_CLOEXEC
-that, when set, causes the file descriptor to be closed when the process
-executes another program.  The Minix-vmd specific
-.B FD_ASYNCHIO
-flag marks a file descriptor for asynchronous I/O operation.
-.RE
-.SP
-.BI "fcntl(" fd ", F_SETFD, int " flags ")"
-.RS
-Set the file descriptor flags of
-.I fd
-to
-.IR flags .
-.RE
-.SP
-.BI "fcntl(" fd ", F_GETFL)"
-.RS
-Return the file status flags and file access modes associated with the file
-associated with file descriptor
-.IR fd .
-The file status flags are
-.B O_NONBLOCK
-(non blocking I/O) and
-.B O_APPEND
-(append mode).  The file access modes are
-.B O_RDONLY
-(read-only),
-.B O_WRONLY
-(write-only) and
-.B O_RDWR
-(read-write).  These flags are also used in the second argument of
-.BR open (2).
-.RE
-.SP
-.BI "fcntl(" fd ", F_SETFL, int " flags ")"
-.RS
-Set the file status flags of the file referenced by
-.I fd
-to
-.IR flags .
-Only
-.B O_NONBLOCK
-and
-.B O_APPEND
-may be changed.  Access mode flags are ignored.
-.RE
-.SP
-The next four commands use a parameter of type
-.B struct flock
-that is defined in <fcntl.h> as:
-.SP
-.RS
-.nf
-.ta +4n +8n +12n
-struct flock {
-	short	l_type;	/* F_RDLCK, F_WRLCK, or F_UNLCK */
-	short	l_whence;	/* SEEK_SET, SEEK_CUR, or SEEK_END */
-	off_t	l_start;	/* byte offset to start of segment */
-	off_t	l_len;	/* length of segment */
-	pid_t	l_pid;	/* process id of the locks' owner */
-};
-.fi
-.RE
-.SP
-This structure describes a segment of a file.
-.B L_type
-is the lock operation performed on the file segment:
-.B F_RDLCK
-to set a read lock,
-.B F_WRLCK
-to set a write lock, and
-.B F_UNLCK
-to remove a lock.  Several processes may have a read lock on a segment, but
-only one process can have a write lock.
-.B L_whence
-tells if the
-.B l_start
-offset must be interpreted from the start of the file
-.RB ( SEEK_SET ),
-the current file position
-.RB ( SEEK_CUR ),
-or the end of the file
-.RB ( SEEK_END ).
-This is analogous to the third parameter of
-.BR lseek (2).
-These
-.B SEEK_*
-symbols are declared in <unistd.h>.
-.B L_start
-is the starting offset of the segment of the file.
-.B L_end
-is the length of the segment.  If zero then the segment extends until end of
-file.
-.B L_pid
-is the process-id of the process currently holding a lock on the segment.
-It is returned by
-.BR F_GETLK .
-.SP
-.BI "fcntl(" fd ", F_GETLK, struct flock *" lkp ")"
-.RS
-Find out if some other process has a lock on a segment of the file
-associated by file descriptor
-.I fd
-that overlaps with the segment described by the
-.B flock
-structure pointed to by
-.IR lkp .
-If the segment is not locked then
-.B l_type
-is set to
-.BR F_UNLCK .
-Otherwise an
-.B flock
-structure is returned through
-.I lkp
-that describes the lock held by the other process.
-.B L_start
-is set relative to the start of the file.
-.RE
-.SP
-.BI "fcntl(" fd ", F_SETLK, struct flock *" lkp ")"
-.RS
-Register a lock on a segment of the file associated with file descriptor
-.IR fd .
-The file segment is described by the
-.B struct flock
-pointed to by
-.IR lkp .
-This call returns an error if any part of the segment is already locked.
-.RE
-.SP
-.BI "fcntl(" fd ", F_SETLKW, struct flock *" lkp ")"
-.RS
-Register a lock on a segment of the file associated with file descriptor
-.IR fd .
-The file segment is described by the
-.B struct flock
-pointed to by
-.IR lkp .
-This call blocks waiting for the lock to be released if any part of the
-segment is already locked.
-.RE
-.SP
-.BI "fcntl(" fd ", F_FREESP, struct flock *" lkp ")"
-.RS
-This call frees a segment of disk space occupied by the
-file associated with file descriptor
-.IR fd .
-The segment is described by the
-.B struct flock
-pointed to by
-.IR lkp .
-The file is truncated in length to the byte position indicated by
-.B l_start
-if
-.B l_len
-is zero.  If
-.B l_len
-is nonzero then the file keeps its size, but the freed bytes now read as
-zeros.  (Other than sharing the flock structure, this call has nothing to do
-with locking.)  (This call is common among UNIX(-like) systems.)
-.RE
-.SP
-.BI "fcntl(" fd ", F_SEEK, u64_t " pos ")"
-.RS
-This Minix-vmd specific call sets the file position of the file associated
-with file descriptor
-.I fd
-to the byte offset indicated by the 64-bit number
-.IR pos .
-This is analogous to the call
-.SP
-.RS
-.BI "lseek(" fd ", " pos ", SEEK_SET)"
-.RE
-.SP
-except that
-.B F_SEEK
-can be used on devices larger than 4 gigabyte.
-.RE
-.SH "SEE ALSO"
-.BR open (2),
-.BR dup (2),
-.BR lseek (2),
-.BR ftruncate (3),
-.BR int64 (3).
-.SH DIAGNOSTICS
-.B Fcntl
-returns a file descriptor, flags, or
-.B 0
-to indicate success.  On error
-.B \-1
-is returned, with
-.B errno
-set to the appropriate error code.  The most notable errors are:
-.TP 5
-.B EINTR
-If a blocked
-.B F_SETLKW
-operation is interrupted by a signal that is caught.
-.TP
-.B EAGAIN
-By
-.B F_SETLK
-if a segment cannot be locked.
-.TP
-.B EBADF
-A bad file descriptor in general, or an attempt to place a write lock on a
-file that is not open for writing, etc.
-.TP
-.B ENOLCK
-No locks available, the file system code has run out of internal table
-space.
-.SH AUTHOR
-Kees J. Bot <kjb@cs.vu.nl>
-
-.\"
-.\" $PchId: fcntl.2,v 1.2 2000/08/11 19:39:51 philip Exp $
Index: trunk/minix/man/man2/fork.2
===================================================================
--- trunk/minix/man/man2/fork.2	(revision 9)
+++ 	(revision )
@@ -1,74 +1,0 @@
-.\" Copyright (c) 1980 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)fork.2	6.4 (Berkeley) 5/22/86
-.\"
-.TH FORK 2 "May 22, 1986"
-.UC
-.SH NAME
-fork \- create a new process
-.SH SYNOPSIS
-.nf
-.ft B
-#include <sys/types.h>
-#include <unistd.h>
-
-pid_t fork(void)
-.ft R
-.fi
-.SH DESCRIPTION
-.de SP
-.if t .sp 0.4
-.if n .sp
-..
-.B Fork
-causes creation of a new process.
-The new process (child process) is an exact copy of the
-calling process except for the following:
-.RS
-.SP
-The child process has a unique process ID.
-.SP
-The child process has a different parent process ID (i.e.,
-the process ID of the parent process).
-.SP
-The child process has its own copy of the parent's descriptors.
-These descriptors reference the same underlying objects, so that,
-for instance, file pointers in file objects are shared between
-the child and the parent, so that an
-.BR lseek (2)
-on a descriptor in the child process can affect a subsequent
-.B read
-or
-.B write
-by the parent.
-This descriptor copying is also used by the shell to
-establish standard input and output for newly created processes
-as well as to set up pipes.
-.SP
-The child starts with no pending signals and an inactive alarm timer.
-.RE
-.SH "RETURN VALUE
-Upon successful completion, \fBfork\fP returns a value
-of 0 to the child process and returns the process ID of the child
-process to the parent process.  Otherwise, a value of \-1 is returned
-to the parent process, no child process is created, and the global
-variable \fBerrno\fP is set to indicate the error.
-.SH ERRORS
-.B Fork
-will fail and no child process will be created if one or more of the
-following are true:
-.TP 15
-[EAGAIN]
-The system-imposed limit on the total
-number of processes under execution would be exceeded.
-This limit is configuration-dependent.
-(The kernel variable NR_PROCS in <minix/config.h> (Minix), or
-<minix/const.h> (Minix-vmd).)
-.TP 15
-[ENOMEM]
-There is insufficient (virtual) memory for the new process.
-.SH "SEE ALSO"
-.BR execve (2),
-.BR wait (2).
Index: trunk/minix/man/man2/getgid.2
===================================================================
--- trunk/minix/man/man2/getgid.2	(revision 9)
+++ 	(revision )
@@ -1,34 +1,0 @@
-.\" Copyright (c) 1983 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)getgid.2	6.2 (Berkeley) 1/7/86
-.\"
-.TH GETGID 2 "January 7, 1986"
-.UC 5
-.SH NAME
-getgid, getegid \- get group identity
-.SH SYNOPSIS
-.nf
-.ft B
-#include <sys/types.h>
-#include <unistd.h>
-
-gid_t getgid(void)
-gid_t getegid(void)
-.fi
-.SH DESCRIPTION
-.B Getgid
-returns the real group ID of the current process,
-.B getegid
-the effective group ID.
-.PP
-The real group ID is specified at login time.
-.PP
-The effective group ID is more transient, and determines
-additional access permission during execution of a
-``set-group-ID'' process, and it is for such processes
-that \fBgetgid\fP is most useful.
-.SH "SEE ALSO"
-.BR getuid (2),
-.BR setgid (2).
Index: trunk/minix/man/man2/getpid.2
===================================================================
--- trunk/minix/man/man2/getpid.2	(revision 9)
+++ 	(revision )
@@ -1,33 +1,0 @@
-.\" Copyright (c) 1980 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)getpid.2	6.3 (Berkeley) 5/13/86
-.\"
-.TH GETPID 2 "May 13, 1986"
-.UC 4
-.SH NAME
-getpid, getppid \- get process identification
-.SH SYNOPSIS
-.ft B
-.nf
-#include <sys/types.h>
-#include <unistd.h>
-
-pid_t getpid(void)
-pid_t getppid(void)
-.fi
-.ft R
-.SH DESCRIPTION
-.B Getpid
-returns
-the process ID of
-the current process.
-Most often it is used
-to generate uniquely-named temporary files.
-.PP
-.B Getppid
-returns the process ID of the parent
-of the current process. 
-.SH "SEE ALSO
-.BR fork (2).
Index: trunk/minix/man/man2/getpriority.2
===================================================================
--- trunk/minix/man/man2/getpriority.2	(revision 9)
+++ 	(revision )
@@ -1,37 +1,0 @@
-.TH GETPRIORITY 2 "Jul 1, 2005"
-.UC 4
-.SH NAME
-getpriority, setpriority \- get and set scheduling priority
-.SH SYNOPSIS
-.nf
-.ft B
-#include <sys/resource.h>
-
-int getpriority(int \fIwhich\fP, int \fIwho\fP)
-int setpriority(int \fIwhich\fP, int \fIwho\fP, int \fIprio\fP)
-.SH DESCRIPTION
-.B Getpriority
-returns the scheduling priority of the process, process group, or user
-referred to in \fIwho\fP. Which of the three is indicated in
-\fIwhich\fP, by PRIO_PROCESS, PRIO_PGRP and PRIO_USER, respectively.
-In MINIX 3, currently only PRIO_PROCESS is implemented.
-
-The range of the returned value is between PRIO_MIN and PRIO_MAX,
-currently between -20 and 20, and is the so-called nice value of
-a process. The higher the nice value, the less favourable the scheduling
-priority.
-
-.B Setpriority
-sets the priority indicated by \fIwho\fP and \fIwhich\fP to \fIprio\fP.
-\fIprio\fP, which is the nice value, may only be lowered by the super-user.
-.SH RETURN VALUES
-These functions both return -1 on failure, and set errno in this case.
-Because
-.B getpriority
-can return -1 as the real nice value, the caller has to reset errno
-and check errno afterwards to distinguish between an error condition
-and a negative nice value.
-.SH SEE ALSO
-nice(1)
-.SH AUTHOR
-Ben Gras <beng@few.vu.nl>
Index: trunk/minix/man/man2/gettimeofday.2
===================================================================
--- trunk/minix/man/man2/gettimeofday.2	(revision 9)
+++ 	(revision )
@@ -1,22 +1,0 @@
-.TH GETTIMEOFDAY 2 "July 6, 2005"
-.UC 4
-.SH NAME
-gettimeofday \- get date and time
-.SH SYNOPSIS
-.ft B
-.nf
-#include <sys/time.h>
-
-int gettimeofday(struct timeval *tp, struct timezone *tzp)
-.fi
-.ft R
-.SH DESCRIPTION
-.B Gettimeofday
-returns the time in seconds and microseconds since epoch in GMT
-(midnight, january 1st, 1970). The timezone argument tzp is expected
-to be NULL.
-.SH RETURNS
-0 on success, -1 on error. If -1 is returned, errno is set to indicate
-the error.
-.SH "SEE ALSO
-.BR ctime (3).
Index: trunk/minix/man/man2/getuid.2
===================================================================
--- trunk/minix/man/man2/getuid.2	(revision 9)
+++ 	(revision )
@@ -1,34 +1,0 @@
-.\" Copyright (c) 1980 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)getuid.2	6.3 (Berkeley) 1/7/86
-.\"
-.TH GETUID 2 "January 7, 1986"
-.UC 4
-.SH NAME
-getuid, geteuid \- get user identity
-.SH SYNOPSIS
-.nf
-.ft B
-#include <sys/types.h>
-#include <unistd.h>
-
-uid_t getuid(void)
-uid_t geteuid(void)
-.fi
-.SH DESCRIPTION
-.B Getuid
-returns the real user ID of the current process,
-.B geteuid
-the effective user ID.
-.PP
-The real user ID identifies the person who is logged in.
-The effective user ID
-gives the process additional permissions during
-execution of \*(lqset-user-ID\*(rq mode processes, which use
-\fBgetuid\fP to determine the real-user-id of the process that
-invoked them.
-.SH "SEE ALSO"
-.BR getgid (2),
-.BR setuid (2).
Index: trunk/minix/man/man2/intro.2
===================================================================
--- trunk/minix/man/man2/intro.2	(revision 9)
+++ 	(revision )
@@ -1,449 +1,0 @@
-.\" Copyright (c) 1980,1983,1986 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)intro.2	6.7 (Berkeley) 5/23/86
-.\"
-.TH INTRO 2 "June 30, 1986"
-.UC 4
-.de en
-.HP
-\\$1  \\$2  \\$3
-.br
-..
-.SH NAME
-intro, errno \- introduction to system calls and error numbers
-.SH SYNOPSIS
-.B "#include <errno.h>"
-.SH DESCRIPTION
-This section describes all of the system calls.  Most
-of these calls have one or more error returns.
-An error condition is indicated by an otherwise impossible return
-value.  This is almost always \-1; the individual descriptions
-specify the details.
-Note that a number of system calls overload the meanings of these
-error numbers, and that the meanings must be interpreted according
-to the type and circumstances of the call.
-.PP
-As with normal arguments, all return codes and values from
-functions are of type integer unless otherwise noted.
-An error number is also made available in the external
-variable \fBerrno\fP, which is not cleared
-on successful calls.
-Thus \fBerrno\fP should be tested only after an error has occurred.
-.PP
-The following is a complete list of the errors and their
-names as given in
-.RI < sys/errno.h >:
-.en 0 OK "Error 0
-Unused.  (The symbol "OK" is only used inside the kernel source.)
-.en 1 EPERM "Not owner
-Typically this error indicates
-an attempt to modify a file in some way forbidden
-except to its owner or super-user.
-It is also returned for attempts
-by ordinary users to do things
-allowed only to the super-user.
-.en 2 ENOENT "No such file or directory
-This error occurs when a file name is specified
-and the file should exist but doesn't, or when one
-of the directories in a path name does not exist.
-.en 3 ESRCH "No such process
-The process or process group whose number was given
-does not exist, or any such process is already dead.
-.en 4 EINTR "Interrupted system call
-An asynchronous signal (such as interrupt or quit)
-that the user has elected to catch
-occurred during a system call.
-If execution is resumed
-after processing the signal
-and the system call is not restarted,
-it will appear as if the interrupted system call
-returned this error condition.
-.en 5 EIO "I/O error
-Some physical I/O error occurred during an I/O operation, usually
-.B read
-or
-.BR write .
-Operations on file descriptors that refer to devices that are forcefully
-taken away or in a bad state will also provoke this error.
-.en 6 ENXIO "No such device or address
-I/O on a special file refers to a subdevice that does not
-exist,
-or beyond the limits of the device.
-It may also occur when, for example, an illegal tape drive
-unit number is selected 
-or a disk pack is not loaded on a drive.
-.en 7 E2BIG "Arg list too long
-An argument list longer than ARG_MAX bytes is presented to
-.BR execve .
-ARG_MAX is set to 4096 bytes for 16-bit MINIX 3, 16384 bytes for 32-bit
-MINIX 3, and unlimited for Minix-vmd as these systems are released.
-.en 8 ENOEXEC "Exec format error
-A request is made to execute a file
-that, although it has the appropriate permissions,
-does not start with a valid magic number, (see
-.BR a.out (5)).
-.en 9 EBADF "Bad file number
-Either a file descriptor refers to no
-open file,
-or a read (resp. write) request is made to
-a file that is open only for writing (resp. reading).
-.en 10 ECHILD "No children
-.B Wait
-and the process has no
-living or unwaited-for children.
-.en 11 EAGAIN "Resource temporarily unavailable
-In a
-.B fork,
-the system's process table is full or the user is not allowed to create
-any more processes, otherwise an operation that would cause a process to
-block was attempted on an object in non-blocking mode (see \fBfcntl\fP(2)).
-.en 12 ENOMEM "Not enough core
-During an
-.B execve
-or
-.B brk,
-a program asks for more (virtual) memory than the system is
-able to supply,
-or a process size limit would be exceeded.
-The maximum size
-of the data+stack segment is set by the
-.BR chmem (1)
-program.  For Minix-vmd a small data+stack size is increased to 3 megabytes
-when a program is executed.
-.en 13 EACCES "Permission denied
-An attempt was made to access a file in a way forbidden
-by the protection system.  Also an attempt to open a device for writing
-that is physically write protected.
-.en 14 EFAULT "Bad address
-An argument of a system call is outside the address space allocated to a
-process.
-.en 15 ENOTBLK "Block device required
-A plain file was mentioned where a block device was required,
-e.g., in
-.BR mount .
-.en 16 EBUSY "Resource busy
-An attempt to mount a device that was already mounted or
-an attempt was made to dismount a device
-on which there is an active file
-(open file, current directory, mounted-on file, or active text segment).
-A request was made to an exclusive access device that was already in use.
-.en 17 EEXIST "File exists
-An existing file was mentioned in an inappropriate context,
-e.g.,
-.BR link .
-.en 18 EXDEV "Cross-device link
-A hard link to a file on another device
-was attempted.
-.en 19 ENODEV "No such device
-An attempt was made to access a device that is not configured by the system,
-i.e., there is no driver for the device.
-.en 20 ENOTDIR "Not a directory
-A non-directory was specified where a directory
-is required,
-for example, in a path name or
-as an argument to
-.BR chdir .
-.en 21 EISDIR "Is a directory
-An attempt to write on a directory.
-.en 22 EINVAL "Invalid argument
-Some invalid argument:
-dismounting a non-mounted
-device,
-mentioning an unknown signal in
-.B signal,
-or some other argument inappropriate for the call.
-Also set by math functions, (see 
-.BR math (3)).
-.en 23 ENFILE "File table overflow
-The system's table of open files is full,
-and temporarily no more
-.I opens
-can be accepted.
-.en 24 EMFILE "Too many open files
-The limit on the number of open files per process, OPEN_MAX, is reached.
-As released, this limit is 20 for MINIX 3, and 30 for Minix-vmd.
-.en 25 ENOTTY "Not a typewriter
-The file mentioned in an
-.B ioctl
-is not a terminal or one of the
-devices to which this call applies.  (Often seen error from programs with
-bugs in their error reporting code.)
-.en 26 ETXTBSY "Text file busy
-Attempt to execute a program that is open for writing.  Obsolete under MINIX 3.
-.en 27 EFBIG "File too large
-The size of a file exceeded the maximum (little over 64 megabytes for
-the V2 file system).
-.en 28 ENOSPC "No space left on device
-A
-.B write
-to an ordinary file, the creation of a
-directory or symbolic link, or the creation of a directory
-entry failed because no more disk blocks are available
-on the file system, or the allocation of an inode for a newly
-created file failed because no more inodes are available
-on the file system.
-.en 29 ESPIPE "Illegal seek
-An
-.B lseek
-was issued to a pipe or TCP/IP channel.
-This error may also be issued for
-other non-seekable devices.
-.en 30 EROFS "Read-only file system
-An attempt to modify a file or directory
-was made
-on a device mounted read-only.
-.en 31 EMLINK "Too many links
-An attempt to make more than a certain number of hard links to a file.  The
-advertized maximum, LINK_MAX, is 127, but Minix-vmd uses a much larger
-maximum of 32767 for the V2 file system.
-.en 32 EPIPE "Broken pipe
-A write on a pipe or TCP/IP channel for which there is no process
-to read the data.
-This condition normally generates the signal SIGPIPE;
-the error is returned if the signal is caught or ignored.
-.en 33 EDOM "Math argument
-The argument of a function in the math package
-is out of the domain of the function.
-.en 34 ERANGE "Result too large
-The value of a function in the math package
-is unrepresentable within machine precision.
-.en 35 EDEADLK "Resource deadlock avoided
-A process attempts to place a blocking lock on a file that is already
-locked by another process and that process is waiting for the first
-process to unlock a file that first process already has a lock on.
-(The classic "lock A, lock B" by process 1, and "lock B, lock A" by
-process 2.)
-.en 36 ENAMETOOLONG "File name too long"
-The path name exceeds PATH_MAX characters.  PATH_MAX equals 255 as
-distributed.
-.en 37 ENOLCK "No locks available
-The system's table of active locks is full.
-.en 38 ENOSYS "Function not implemented
-The system call is not supported.  Either an old program uses an obsolete
-call, or a program for a more capable system is run on a less capable
-system.
-.en 39 ENOTEMPTY "Directory not empty"
-A directory with entries other than \*(lq.\*(rq and \*(lq..\*(rq
-was supplied to a remove directory or rename call.
-.en 40 ELOOP "Too many symbolic links"
-A path name lookup involved more than SYMLOOP symbolic links.  SYMLOOP
-equals 8 as distributed.
-(Minix-vmd)
-.en 50 EPACKSIZE "Invalid packet size
-.en 51 EOUTOFBUFS "Not enough buffers left
-.en 52 EBADIOCTL "Illegal ioctl for device
-.en 53 EBADMODE "Bad mode in ioctl
-.en 54 EWOULDBLOCK "Would block
-.en 55 EBADDEST "Bad destination address
-.en 56 EDSTNOTRCH "Destination not reachable
-.en 57 EISCONN "Already connected
-.en 58 EADDRINUSE "Address in use
-.en 59 ECONNREFUSED "Connection refused
-.en 60 ECONNRESET "Connection reset
-.en 61 ETIMEDOUT "Connection timed out
-.en 62 EURG "Urgent data present
-.en 63 ENOURG "No urgent data present
-.en 64 ENOTCONN "No connection
-.en 65 ESHUTDOWN "Already shutdown
-.en 66 ENOCONN "No such connection
-.en 67 EINPROGRESS "Operation now in progress
-.en 68 EALREADY "Operation already in progress
-.ig
-.en XXX EDQUOT "Disc quota exceeded"
-A 
-.B write
-to an ordinary file, the creation of a
-directory or symbolic link, or the creation of a directory
-entry failed because the user's quota of disk blocks was
-exhausted, or the allocation of an inode for a newly
-created file failed because the user's quota of inodes
-was exhausted.
-.en XXX ESTALE "Stale NFS file handle"
-A client referenced a an open file, when the file has been deleted.
-.en XXX EREMOTE "Too many levels of remote in path"
-An attempt was made to remotely mount a file system into a path which
-already has a remotely mounted component.
-..
-.SH DEFINITIONS
-.TP 5
-Process ID
-.br
-Each active process in the system is uniquely identified by a positive
-integer called a process ID.  The range of this ID is from 1 to 29999.
-The special process with process ID 1 is
-.BR init ,
-the ancestor of all processes.
-.TP 5
-Parent process ID
-.br
-A new process is created by a currently active process; (see
-.BR fork (2)).
-The parent process ID of a process is the process ID of its creator,
-unless the creator dies, then
-.B init
-becomes the parent of the orphaned process.
-.TP 5
-Process Group ID
-.br
-Each active process is a member of a process group that is identified by
-a positive integer called the process group ID.  This is the process
-ID of the group leader.  This grouping permits the signaling of related
-processes (see
-.BR kill (2)).
-.TP 5
-Real User ID and Real Group ID
-.br
-Each user on the system is identified by a positive integer
-termed the real user ID.
-.IP
-Each user is also a member of one or more groups.
-One of these groups is distinguished from others and
-used in implementing accounting facilities.  The positive
-integer corresponding to this distinguished group is termed 
-the real group ID.
-(Under standard MINIX 3 this is the only group a process can be a member of.)
-.IP
-All processes have a real user ID and real group ID.
-These are initialized from the equivalent attributes
-of the process that created it.
-.TP 5
-Effective User Id, Effective Group Id, and Access Groups
-.br
-Access to system resources is governed by three values:
-the effective user ID, the effective group ID, and the
-group access list.
-.IP
-The effective user ID and effective group ID are initially the
-process's real user ID and real group ID respectively.  Either
-may be modified through execution of a set-user-ID or set-group-ID
-file (possibly by one its ancestors) (see
-.BR execve (2)).
-.IP
-The group access list is an additional set of group ID's
-used only in determining resource accessibility.  Access checks
-are performed as described below in ``File Access Permissions''.
-The maximum number of additional group ID's is NGROUPS_MAX.
-For MINIX 3 this is 0, but Minix-vmd supports a list of up to 16
-additional group ID's.  (Also known as ``supplemental'' group ID's.)
-.TP 5
-Super-user
-.br
-A process is recognized as a
-.I super-user
-process and is granted special privileges if its effective user ID is 0.
-.TP 5
-Descriptor
-.br
-An integer assigned by the system when a file or device is referenced
-by
-.BR open (2),
-.BR dup (2)
-or
-.BR fcntl (2)
-which uniquely identifies an access path to that file or device from
-a given process or any of its children.
-.TP 5
-File Descriptor
-Older, and often used name for a descriptor.
-.TP 5
-File Name
-.br
-Names consisting of up to NAME_MAX characters may be used to name
-an ordinary file, special file, or directory.  NAME_MAX is the maximum
-of the maximum file name lengths of the supported file systems.
-Excess characters are ignored when too long file names are used for
-files in a given file system.
-The maximum file name length of the V1 and V2 file systems
-is 14 characters.  The Minix-vmd "flex" variants of V1 and V2 have a
-60 character maximum.
-.IP
-The characters in a file name may assume any value representable in
-eight bits excluding 0 (null) and the ASCII code for / (slash).
-.IP
-Note that it is generally unwise to use one of \e'"<>();~$^&*|{}[]?
-as part of file names because of the special meaning attached to these
-characters by the shell.
-.TP 5
-Path Name
-.br
-A path name is a null-terminated character string starting with an
-optional slash (/), followed by zero or more directory names separated
-by slashes, optionally followed by a file name.
-The total length of a path name must be less than PATH_MAX characters
-(255 as distributed.)
-.IP
-If a path name begins with a slash, the path search begins at the
-.I root
-directory.
-Otherwise, the search begins from the current working directory.
-A slash by itself names the root directory.  A null pathname is
-illegal, use "." to refer to the current working directory.
-.TP 5
-Directory
-.br
-A directory is a special type of file that contains entries
-that are references to other files.
-Directory entries are called links.  By convention, a directory
-contains at least two links, . and .., referred to as
-.I dot
-and
-.I dot-dot
-respectively.  Dot refers to the directory itself and
-dot-dot refers to its parent directory.
-.TP 5
-Root Directory and Current Working Directory
-.br
-Each process has associated with it a concept of a root directory
-and a current working directory for the purpose of resolving path
-name searches.  A process's root directory need not be the root
-directory of the root file system.
-.TP 5
-File Access Permissions
-.br
-Every file in the file system has a set of access permissions.
-These permissions are used in determining whether a process
-may perform a requested operation on the file (such as opening
-a file for writing).  Access permissions are established at the
-time a file is created.  They may be changed at some later time
-through the 
-.BR chmod (2)
-call. 
-.IP
-File access is broken down according to whether a file may be: read,
-written, or executed.  Directory files use the execute
-permission to control if the directory may be searched. 
-.IP
-File access permissions are interpreted by the system as
-they apply to three different classes of users: the owner
-of the file, those users in the file's group, anyone else.
-Every file has an independent set of access permissions for
-each of these classes.  When an access check is made, the system
-decides if permission should be granted by checking the access
-information applicable to the caller.
-.IP
-Read, write, and execute/search permissions on
-a file are granted to a process if:
-.IP
-The process's effective user ID is that of the super-user.
-.IP
-The process's effective user ID matches the user ID of the owner
-of the file and the owner permissions allow the access.
-.IP
-The process's effective user ID does not match the user ID of the
-owner of the file, and either the process's effective
-group ID matches the group ID
-of the file, or the group ID of the file is in
-the process's group access list,
-and the group permissions allow the access.
-.IP
-Neither the effective user ID nor effective group ID
-and group access list of the process
-match the corresponding user ID and group ID of the file,
-but the permissions for ``other users'' allow access.
-.IP
-Otherwise, permission is denied.
-.SH SEE ALSO
-.BR intro (3),
-.BR strerror (3).
Index: trunk/minix/man/man2/ioctl.2
===================================================================
--- trunk/minix/man/man2/ioctl.2	(revision 9)
+++ 	(revision )
@@ -1,69 +1,0 @@
-.\" Copyright (c) 1980 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)ioctl.2	6.3 (Berkeley) 3/4/86
-.\"
-.TH IOCTL 2 "March 4, 1986"
-.UC 4
-.SH NAME
-ioctl \- control device
-.SH SYNOPSIS
-.nf
-.ft B
-#include <sys/types.h>
-#include <sys/ioctl.h>
-
-.ta +54n
-int ioctl(int \fId\fP, int \fIrequest\fP, void *\fIargp\fP)	(Minix)
-int ioctl(int \fId\fP, ioreq_t \fIrequest\fP, void *\fIargp\fP)	(Minix-vmd)
-.DT
-.fi
-.ft R
-.SH DESCRIPTION
-.B Ioctl
-performs a variety of functions
-on open descriptors.  In particular, many operating
-characteristics of character special files (e.g. terminals)
-may be controlled with
-.B ioctl
-requests.
-The writeups of various devices in section 4 discuss how
-.B ioctl
-applies to them.
-.PP
-An  ioctl
-.I request
-has encoded in it whether the argument is an \*(lqin\*(rq parameter
-or \*(lqout\*(rq parameter, and the size of the argument \fIargp\fP in bytes.
-Macros and defines used in specifying an ioctl
-.I request
-are located in the file
-.IR <sys/ioctl.h> .
-.SH "RETURN VALUE
-If an error has occurred, a value of \-1 is returned and
-.B errno
-is set to indicate the error.
-.SH ERRORS
-.B Ioctl
-will fail if one or more of the following are true:
-.TP 15
-[EBADF]
-\fID\fP is not a valid descriptor.
-.TP 15
-[ENOTTY]
-\fID\fP is not associated with a character
-special device.
-.TP 15
-[ENOTTY]
-The specified request does not apply to the kind
-of object that the descriptor \fId\fP references.
-.TP 15
-[EINVAL]
-\fIRequest\fP or \fIargp\fP is not valid.
-.SH "SEE ALSO"
-.BR execve (2),
-.BR fcntl (2),
-.BR mt (4),
-.BR tty (4),
-.BR intro (4).
Index: trunk/minix/man/man2/kill.2
===================================================================
--- trunk/minix/man/man2/kill.2	(revision 9)
+++ 	(revision )
@@ -1,93 +1,0 @@
-.\" Copyright (c) 1980 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)kill.2	6.5 (Berkeley) 5/14/86
-.\"
-.TH KILL 2 "May 14, 1986"
-.UC 4
-.SH NAME
-kill \- send signal to a process
-.SH SYNOPSIS
-.nf
-.ft B
-#include <sys/types.h>
-#include <signal.h>
-
-int kill(pid_t \fIpid\fP, int \fIsig\fP)
-.ft R
-.fi
-.SH DESCRIPTION
-.B Kill
-sends the signal \fIsig\fP
-to a process, specified by the process number
-.IR pid .
-.I Sig
-may be one of the signals specified in
-.BR sigaction (2),
-or it may be 0, in which case
-error checking is performed but no
-signal is actually sent. 
-This can be used to check the validity of
-.IR pid .
-.PP
-The sending and receiving processes must
-have the same effective user ID, otherwise
-this call is restricted to the super-user.
-.ig
-A single exception is the signal SIGCONT, which may always be sent
-to any descendant of the current process.
-..
-.PP
-If the process number is 0,
-the signal is sent to all processes in the
-sender's process group.
-.PP
-If the process number is \-1
-and the user is the super-user,
-the signal is broadcast universally
-except to
-.B init
-and the process sending the signal.
-If the process number is \-1
-and the user is not the super-user,
-the signal is broadcast universally to
-all processes with the same uid as the user
-except the process sending the signal.
-No error is returned if any process could be signaled.
-.PP
-If the process number is negative but not \-1,
-the signal is sent to all processes whose process group ID
-is equal to the absolute value of the process number.
-.PP
-Processes may send signals to themselves.
-.SH "RETURN VALUE
-Upon successful completion, a value of 0 is returned.
-Otherwise, a value of \-1 is returned and
-.B errno
-is set to indicate the error.
-.SH "ERRORS
-.B Kill
-will fail and no signal will be sent if any of the following
-occur:
-.TP 15
-[EINVAL]
-\fISig\fP is not a valid signal number.
-.TP 15
-[ESRCH]
-No process can be found corresponding to that specified by \fIpid\fP.
-.TP 15
-[ESRCH]
-The process id was given as 0
-but the sending process does not have a process group.
-.TP 15
-[EPERM]
-The sending process is not the super-user and its effective
-user id does not match the effective user-id of the receiving process.
-When signaling a process group, this error was returned if any members
-of the group could not be signaled.
-.SH "SEE ALSO"
-.BR getpid (2),
-.BR getpgrp (2),
-.BR sigaction (2),
-.BR raise (3).
Index: trunk/minix/man/man2/link.2
===================================================================
--- trunk/minix/man/man2/link.2	(revision 9)
+++ 	(revision )
@@ -1,111 +1,0 @@
-.\" Copyright (c) 1980 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)link.2	6.3 (Berkeley) 8/26/85
-.\"
-.TH LINK 2 "August 26, 1985"
-.UC 4
-.SH NAME
-link \- make a hard link to a file
-.SH SYNOPSIS
-.nf
-.ft B
-#include <unistd.h>
-
-int link(const char *\fIname1\fP, const char *\fIname2\fP)
-.fi
-.ft R
-.SH DESCRIPTION
-A hard link
-to
-.I name1
-is created;
-the link has the name
-.IR name2 .
-.I Name1
-must exist.
-.PP
-With hard links,
-both
-.I name1
-and
-.I name2
-must be in the same file system.
-.I Name1
-must not be a directory.
-Both the old and the new
-.I link
-share equal access and rights to
-the underlying object.
-.SH "RETURN VALUE
-Upon successful completion, a value of 0 is returned.  Otherwise,
-a value of \-1 is returned and
-.B errno
-is set to indicate the error.
-.SH "ERRORS
-.B Link
-will fail and no link will be created if one or more of the following
-are true:
-.TP 15
-[ENOTDIR]
-A component of either path prefix is not a directory.
-.TP 15
-[ENAMETOOLONG]
-A path name exceeds PATH_MAX characters.
-.TP 15
-[ENOENT]
-A component of either path prefix does not exist.
-.TP 15
-[EACCES]
-A component of either path prefix denies search permission.
-.TP 15
-[EACCES]
-The requested link requires writing in a directory with a mode
-that denies write permission.
-.TP 15
-[ELOOP]
-Too many symbolic links were encountered in translating one of the pathnames.
-(Minix-vmd)
-.TP 15
-[ENOENT]
-The file named by \fIname1\fP does not exist.
-.TP 15
-[EEXIST]
-The link named by \fIname2\fP does exist.
-.TP 15
-[EPERM]
-The file named by \fIname1\fP is a directory and the effective
-user ID is not super-user.
-.TP 15
-[EXDEV]
-The link named by \fIname2\fP and the file named by \fIname1\fP
-are on different file systems.
-.TP 15
-[ENOSPC]
-The directory in which the entry for the new link is being placed
-cannot be extended because there is no space left on the file
-system containing the directory.
-.ig
-.TP 15
-[EDQUOT]
-The directory in which the entry for the new link
-is being placed cannot be extended because the
-user's quota of disk blocks on the file system
-containing the directory has been exhausted.
-..
-.TP 15
-[EIO]
-An I/O error occurred while reading from or writing to 
-the file system to make the directory entry.
-.TP 15
-[EROFS]
-The requested link requires writing in a directory on a read-only file
-system.
-.TP 15
-[EFAULT]
-One of the pathnames specified
-is outside the process's allocated address space.
-.SH "SEE ALSO"
-.BR symlink (2),
-.BR unlink (2).
Index: trunk/minix/man/man2/lseek.2
===================================================================
--- trunk/minix/man/man2/lseek.2	(revision 9)
+++ 	(revision )
@@ -1,86 +1,0 @@
-.\" Copyright (c) 1980 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)lseek.2	6.3 (Berkeley) 2/24/86
-.\"
-.TH LSEEK 2 "February 24, 1986"
-.UC 4
-.SH NAME
-lseek \- move read/write pointer
-.SH SYNOPSIS
-.nf
-.ft B
-#include <sys/types.h>
-#include <unistd.h>
-
-.ta +1.8i +0.6i
-#define SEEK_SET	0	/* offset is absolute */
-#define SEEK_CUR	1	/* relative to current position */
-#define SEEK_END	2	/* relative to end of file */
-
-off_t lseek(int d, off_t offset, int whence)
-.fi
-.ft R
-.SH DESCRIPTION
-The descriptor 
-.I d
-refers to a file or device open for reading and/or writing.
-.B Lseek
-sets the file pointer of
-.I d
-as follows:
-.IP
-If
-.I whence
-is SEEK_SET, the pointer is set to
-.I offset
-bytes.
-.IP
-If
-.I whence
-is SEEK_CUR, the pointer is set to its current location plus
-.IR offset .
-.IP
-If
-.I whence
-is SEEK_END, the pointer is set to the size of the
-file plus
-.IR offset .
-.PP
-Upon successful completion, the resulting pointer location
-as measured in bytes from beginning of the file is returned.
-Some devices are incapable of seeking.  The value of the pointer
-associated with such a device is undefined.
-.SH NOTES
-Seeking far beyond the end of a file, then writing,
-creates a gap or \*(lqhole\*(rq, which occupies no
-physical space and reads as zeros.
-.SH "RETURN VALUE
-Upon successful completion,
-the current file pointer value is returned.
-Otherwise,
-a value of \-1 is returned and \fBerrno\fP is set to indicate
-the error.
-.SH "ERRORS
-.B Lseek
-will fail and the file pointer will remain unchanged if:
-.TP 15
-[EBADF]
-.I Fildes
-is not an open file descriptor.
-.TP 15
-[ESPIPE]
-.I Fildes
-is associated with a pipe or a socket.
-.TP 15
-[EINVAL]
-.I Whence
-is not a proper value.
-.SH "SEE ALSO"
-.BR fcntl (2),
-.BR open (2).
-.SH BUGS
-This document's use of
-.I whence
-is incorrect English, but maintained for historical reasons.
Index: trunk/minix/man/man2/mkdir.2
===================================================================
--- trunk/minix/man/man2/mkdir.2	(revision 9)
+++ 	(revision )
@@ -1,112 +1,0 @@
-.\" Copyright (c) 1983 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)mkdir.2	6.4 (Berkeley) 8/26/85
-.\"
-.TH MKDIR 2 "August 26, 1985"
-.UC 5
-.SH NAME
-mkdir \- make a directory file
-.SH SYNOPSIS
-.nf
-.ft B
-#include <sys/types.h>
-#include <sys/stat.h>
-
-int mkdir(const char *\fIpath\fP, mode_t \fImode\fP)
-.fi
-.ft R
-.SH DESCRIPTION
-.B Mkdir
-creates a new directory file with name
-.IR path .
-The mode of the new file
-is initialized from
-.IR mode .
-(The protection part of the mode
-is modified by the process's mode mask; see
-.BR umask (2)).
-.PP
-The directory's owner ID is set to the process's effective user ID.
-The directory's group ID is set to that of the parent directory in
-which it is created.
-.PP
-The low-order 9 bits of mode are modified by the process's
-file mode creation mask: all bits set in the process's file mode
-creation mask are cleared.  See
-.BR umask (2).
-.SH "RETURN VALUE
-A 0 return value indicates success.  A \-1 return value
-indicates an error, and an error code is stored in
-.B errno.
-.SH "ERRORS
-.B Mkdir
-will fail and no directory will be created if:
-.TP 15
-[ENOTDIR]
-A component of the path prefix is not a directory.
-.TP 15
-[ENAMETOOLONG]
-The path name exceeds PATH_MAX characters.
-.TP 15
-[ENOENT]
-A component of the path prefix does not exist.
-.TP 15
-[EACCES]
-Search permission is denied for a component of the path prefix.
-.TP 15
-[ELOOP]
-Too many symbolic links were encountered in translating the pathname.
-(Minix-vmd)
-.TP 15
-[EROFS]
-The named file resides on a read-only file system.
-.TP 15
-[EEXIST]
-The named file exists.
-.TP 15
-[ENOSPC]
-The directory in which the entry for the new directory is being placed
-cannot be extended because there is no space left on the file
-system containing the directory.
-.TP 15
-[ENOSPC]
-The new directory cannot be created because there
-there is no space left on the file
-system that will contain the directory.
-.TP 15
-[ENOSPC]
-There are no free inodes on the file system on which the
-directory is being created.
-.ig
-.TP 15
-[EDQUOT]
-The directory in which the entry for the new directory
-is being placed cannot be extended because the
-user's quota of disk blocks on the file system
-containing the directory has been exhausted.
-.TP 15
-[EDQUOT]
-The new directory cannot be created because the user's
-quota of disk blocks on the file system that will
-contain the directory has been exhausted.
-.TP 15
-[EDQUOT]
-The user's quota of inodes on the file system on
-which the directory is being created has been exhausted.
-..
-.TP 15
-[EIO]
-An I/O error occurred while making the directory entry or allocating the inode.
-.TP 15
-[EIO]
-An I/O error occurred while reading from or writing to the file system.
-.TP 15
-[EFAULT]
-.I Path
-points outside the process's allocated address space.
-.SH "SEE ALSO"
-.BR chmod (2),
-.BR stat (2),
-.BR umask (2).
Index: trunk/minix/man/man2/mknod.2
===================================================================
--- trunk/minix/man/man2/mknod.2	(revision 9)
+++ 	(revision )
@@ -1,131 +1,0 @@
-.\" Copyright (c) 1980 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)mknod.2	6.4 (Berkeley) 5/23/86
-.\"
-.TH MKNOD 2 "May 23, 1986"
-.UC 4
-.SH NAME
-mknod, mkfifo \- make a special file
-.SH SYNOPSIS
-.nf
-.ft B
-#include <sys/types.h>
-#include <unistd.h>
-#include <sys/stat.h>
-
-int mknod(const char *\fIpath\fP, mode_t \fImode\fP, dev_t \fIdev\fP)
-int mkfifo(const char *\fIpath\fP, mode_t \fImode\fP)
-.fi
-.ft R
-.SH DESCRIPTION
-.B Mknod
-creates a new file
-whose name is
-.I path.
-The mode of the new file
-(including special file bits)
-is initialized from
-.IR mode ,
-as defined in
-.IR <sys/stat.h> .
-(The protection part of the mode
-is modified by the process's mode mask (see
-.BR umask (2))).
-The first block pointer of the i-node
-is initialized from
-.I dev 
-and is used to specify which device the special file
-refers to.
-.PP
-If mode indicates a block or character special file,
-.I dev
-is the device number of a character or block I/O device.
-The low eight bits of the device number hold the minor device number
-that selects a device among the devices governed by the same driver.
-The driver is selected by the major device number, the next eight bits
-of the device number.
-.PP
-If
-.I mode
-does not indicate a block special or character special device,
-.I dev
-is ignored.
-(For example, when creating a ``fifo'' special file.)
-.PP
-.B Mknod
-may be invoked only by the super-user,
-unless it is being used to create a fifo.
-.PP
-The call
-.BI "mkfifo(" path ", " mode ")"
-is equivalent to
-.PP
-.RS
-.BI "mknod(" path ", (" mode " & 0777) | S_IFIFO, 0)"
-.RE
-.SH "RETURN VALUE
-Upon successful completion a value of 0 is returned.
-Otherwise, a value of \-1 is returned and \fBerrno\fP
-is set to indicate the error.
-.SH ERRORS
-.B Mknod
-will fail and the file mode will be unchanged if:
-.TP 15
-[ENOTDIR]
-A component of the path prefix is not a directory.
-.TP 15
-[ENAMETOOLONG]
-The path name exceeds PATH_MAX characters.
-.TP 15
-[ENOENT]
-A component of the path prefix does not exist.
-.TP 15
-[EACCES]
-Search permission is denied for a component of the path prefix.
-.TP 15
-[ELOOP]
-Too many symbolic links were encountered in translating the pathname.
-(Minix-vmd)
-.TP 15
-[EPERM]
-The process's effective user ID is not super-user.
-.TP 15
-[EIO]
-An I/O error occurred while making the directory entry or allocating the inode.
-.TP 15
-[ENOSPC]
-The directory in which the entry for the new node is being placed
-cannot be extended because there is no space left on the file
-system containing the directory.
-.TP 15
-[ENOSPC]
-There are no free inodes on the file system on which the
-node is being created.
-.ig
-.TP 15
-[EDQUOT]
-The directory in which the entry for the new node
-is being placed cannot be extended because the
-user's quota of disk blocks on the file system
-containing the directory has been exhausted.
-.TP 15
-[EDQUOT]
-The user's quota of inodes on the file system on
-which the node is being created has been exhausted.
-..
-.TP 15
-[EROFS]
-The named file resides on a read-only file system.
-.TP 15
-[EEXIST]
-The named file exists.
-.TP 15
-[EFAULT]
-.I Path
-points outside the process's allocated address space.
-.SH "SEE ALSO"
-.BR chmod (2),
-.BR stat (2),
-.BR umask (2).
Index: trunk/minix/man/man2/mount.2
===================================================================
--- trunk/minix/man/man2/mount.2	(revision 9)
+++ 	(revision )
@@ -1,51 +1,0 @@
-.TH MOUNT 2
-.SH NAME
-mount, umount \- mount or umount a file system
-.SH SYNOPSIS
-.ft B
-.nf
-#include <unistd.h>
-#include <sys/mount.h>
-
-int mount(char *\fIspecial\fP, char *\fIname\fP, int \fIflag\fP)
-int umount(char *\fIname\fP)
-.fi
-.ft P
-.SH DESCRIPTION
-.B Mount()
-tells the system that the file system
-.I special
-is to be mounted on the file
-.IR name ,
-effectively overlaying
-.I name
-with the file tree on
-.IR special .
-.I Name
-may of any type, except that if the root of
-.I special
-is a directory, then
-.I name
-must also be a directory.
-.I Special
-must be a block special file, except for loopback mounts.  For loopback
-mounts a normal file or directory is used for
-.IR special ,
-which must be seen as the root of a virtual device.
-.I Flag
-is 0 for a read-write mount, 1 for read-only.
-.PP
-.B Umount()
-removes the connection between a device and a mount point,
-.I name
-may refer to either of them.  If more than one device is mounted on the
-same mount point then unmounting at the mount point removes the last mounted
-device, unmounting a device removes precisely that device.  The unmount will
-only succeed if none of the files on the device are in use.
-.PP
-Both calls may only be executed by the super-user.
-.SH "SEE ALSO"
-.BR mount (1),
-.BR umount (1).
-.SH AUTHOR
-Kees J. Bot (kjb@cs.vu.nl)
Index: trunk/minix/man/man2/open.2
===================================================================
--- trunk/minix/man/man2/open.2	(revision 9)
+++ 	(revision )
@@ -1,186 +1,0 @@
-.\" Copyright (c) 1980 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)open.2	6.4 (Berkeley) 5/14/86
-.\"
-.TH OPEN 2 "May 14, 1986"
-.UC 4
-.SH NAME
-open \- open a file for reading or writing, or create a new file
-.SH SYNOPSIS
-.nf
-.ft B
-#include <sys/types.h>
-#include <fcntl.h>
-
-int open(const char *\fIpath\fP, int \fIflags\fP \fR[\fP, mode_t \fImode\fP\fR]\fP)
-.ft R
-.fi
-.SH DESCRIPTION
-.B Open
-opens the file
-.I path
-for reading and/or writing, as specified by the
-.I flags
-argument and returns a descriptor for that file.
-The
-.I flags
-argument may indicate the file is to be
-created if it does not already exist (by specifying the
-O_CREAT flag), in which case the file is created with mode
-.I mode
-as described in
-.BR chmod (2)
-and modified by the process' umask value (see
-.BR umask (2)).
-.PP
-.I Path
-is the address of a string of ASCII characters representing
-a path name, terminated by a null character.
-The flags specified are formed by
-.IR or 'ing
-the following values
-.PP
-.RS
-.ta +12n
-.nf
-O_RDONLY	open for reading only
-O_WRONLY	open for writing only
-O_RDWR	open for reading and writing
-O_NONBLOCK	do not block on open
-O_APPEND	append on each write
-O_CREAT	create file if it does not exist
-O_TRUNC	truncate size to 0
-O_EXCL	error if create and file exists
-.fi
-.DT
-.RE
-.PP
-Opening a file with O_APPEND set causes each write on the file
-to be appended to the end.  If O_TRUNC is specified and the
-file exists, the file is truncated to zero length.
-If O_EXCL is set with O_CREAT, then if the file already
-exists, the open returns an error.  This can be used to
-implement a simple exclusive access locking mechanism.
-If O_EXCL is set and the last component of the pathname is
-a symbolic link, the open will fail even if the symbolic
-link points to a non-existent name.
-If the O_NONBLOCK flag is specified and the open call would result
-in the process being blocked for some reason, the open returns immediately. 
-.PP
-Upon successful completion a non-negative integer termed a
-file descriptor is returned.
-The file pointer used to mark the current position within the
-file is set to the beginning of the file.
-.PP
-The new descriptor is set to remain open across
-.BR execve
-system calls; see
-.BR close (2).
-.PP
-The system imposes a limit on the number of descriptors
-open simultaneously by one process.
-.SH "ERRORS
-The named file is opened unless one or more of the
-following are true:
-.TP 15
-[ENOTDIR]
-A component of the path prefix is not a directory.
-.TP 15
-[ENAMETOOLONG]
-The path name exceeds PATH_MAX characters.
-.TP 15
-[ENOENT]
-O_CREAT is not set and the named file does not exist.
-.TP 15
-[ENOENT]
-A component of the path name that must exist does not exist.
-.TP 15
-[EACCES]
-Search permission is denied for a component of the path prefix.
-.TP 15
-[EACCES]
-The required permissions (for reading and/or writing)
-are denied for the named file.
-.TP 15
-[EACCES]
-O_CREAT is specified,
-the file does not exist,
-and the directory in which it is to be created
-does not permit writing.
-.TP 15
-[EACCES]
-A device to be opened for writing is physically write protected.
-.TP 15
-[ELOOP]
-Too many symbolic links were encountered in translating the pathname.
-(Minix-vmd)
-.TP 15
-[EISDIR]
-The named file is a directory, and the arguments specify
-it is to be opened for writing.
-.TP 15
-[EROFS]
-The named file resides on a read-only file system,
-and the file is to be modified.
-.TP 15
-[EMFILE]
-The system limit for open file descriptors per process has already been reached.
-.TP 15
-[ENFILE]
-The system file table is full.
-.TP 15
-[ENXIO]
-The named file is a character special or block
-special file, and the device associated with this special file
-does not exist.
-.TP 15
-[ENOSPC]
-O_CREAT is specified,
-the file does not exist,
-and the directory in which the entry for the new file is being placed
-cannot be extended because there is no space left on the file
-system containing the directory.
-.TP 15
-[ENOSPC]
-O_CREAT is specified,
-the file does not exist,
-and there are no free inodes on the file system on which the
-file is being created.
-.ig
-.TP 15
-[EDQUOT]
-O_CREAT is specified,
-the file does not exist,
-and the directory in which the entry for the new fie
-is being placed cannot be extended because the
-user's quota of disk blocks on the file system
-containing the directory has been exhausted.
-.TP 15
-[EDQUOT]
-O_CREAT is specified,
-the file does not exist,
-and the user's quota of inodes on the file system on
-which the file is being created has been exhausted.
-..
-.TP 15
-[EIO]
-An I/O error occurred while making the directory entry or
-allocating the inode for O_CREAT.
-.TP 15
-[EFAULT]
-.I Path
-points outside the process's allocated address space.
-.TP 15
-[EEXIST]
-O_CREAT and O_EXCL were specified and the file exists.
-.SH "SEE ALSO"
-.BR chmod (2),
-.BR close (2),
-.BR dup (2),
-.BR fcntl (2),
-.BR lseek (2),
-.BR read (2),
-.BR write (2),
-.BR umask (2).
Index: trunk/minix/man/man2/pause.2
===================================================================
--- trunk/minix/man/man2/pause.2	(revision 9)
+++ 	(revision )
@@ -1,43 +1,0 @@
-.\" Copyright (c) 1980 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)pause.3c	6.1 (Berkeley) 5/9/85
-.\"
-.TH PAUSE 2 "May 9, 1985"
-.UC 4
-.SH NAME
-pause \- stop until signal
-.SH SYNOPSIS
-.nf
-.ft B
-#include <unistd.h>
-
-int pause(void)
-.ft R
-.fi
-.SH DESCRIPTION
-.B Pause
-never returns normally.
-It is used to give up control while waiting for
-a signal from
-.BR kill (2)
-or the alarm timer, see
-.BR alarm (2).
-Upon termination of a signal handler started during a
-.B pause,
-the
-.B pause
-call will return.
-.SH "RETURN VALUE
-Always returns \-1.
-.SH ERRORS
-.B Pause
-always returns:
-.TP 15
-[EINTR]
-The call was interrupted.
-.SH "SEE ALSO
-.BR alarm (2),
-.BR kill (2),
-.BR sigsuspend (2).
Index: trunk/minix/man/man2/pipe.2
===================================================================
--- trunk/minix/man/man2/pipe.2	(revision 9)
+++ 	(revision )
@@ -1,89 +1,0 @@
-.\" Copyright (c) 1980 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)pipe.2	6.2 (Berkeley) 8/26/85
-.\"
-.TH PIPE 2 "August 26, 1985"
-.UC 4
-.SH NAME
-pipe \- create an interprocess communication channel
-.SH SYNOPSIS
-.nf
-.ft B
-#include <unistd.h>
-
-int pipe(int \fIfildes\fP[2])
-.fi
-.ft R
-.SH DESCRIPTION
-The
-.B pipe
-system call
-creates an I/O mechanism called a pipe.
-The file descriptors returned can
-be used in read and write operations.
-When the pipe is written using the descriptor
-.IR fildes [1]
-up to PIPE_MAX bytes of data are buffered
-before the writing process is suspended.
-A read using the descriptor
-.IR fildes [0]
-will pick up the data.
-.PP
-PIPE_MAX equals 7168 under MINIX 3, but note that most systems use 4096.
-.PP
-It is assumed that after the
-pipe has been set up,
-two (or more)
-cooperating processes
-(created by subsequent
-.B fork
-calls)
-will pass data through the
-pipe with
-.B read
-and
-.B write
-calls.
-.PP
-The shell has a syntax
-to set up a linear array of processes
-connected by pipes.
-.PP
-Read calls on an empty
-pipe (no buffered data) with only one end
-(all write file descriptors closed)
-returns an end-of-file.
-.PP
-The signal SIGPIPE is generated if a write on a pipe with only one end
-is attempted.
-.SH "RETURN VALUE
-The function value zero is returned if the
-pipe was created; \-1 if an error occurred.
-.SH ERRORS
-The \fBpipe\fP call will fail if:
-.TP 15
-[EMFILE]
-Too many descriptors are active.
-.TP 15
-[ENFILE]
-The system file table is full.
-.TP 15
-[ENOSPC]
-The pipe file system (usually the root file system) has no free inodes.
-.TP 15
-[EFAULT]
-The \fIfildes\fP buffer is in an invalid area of the process's address
-space.
-.SH "SEE ALSO"
-.BR sh (1),
-.BR read (2),
-.BR write (2),
-.BR fork (2).
-.SH NOTES
-Writes may return ENOSPC errors if no pipe data can be buffered, because
-the pipe file system is full.
-.SH BUGS
-Should more than PIPE_MAX bytes be necessary in any
-pipe among a loop of processes, deadlock will occur.
Index: trunk/minix/man/man2/ptrace.2
===================================================================
--- trunk/minix/man/man2/ptrace.2	(revision 9)
+++ 	(revision )
@@ -1,231 +1,0 @@
-.\" Copyright (c) 1980 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)ptrace.2	6.4 (Berkeley) 5/23/86
-.\"
-.TH PTRACE 2 "May 23, 1986"
-.UC 4
-.SH NAME
-ptrace \- process trace
-.SH SYNOPSIS
-.nf
-.ft B
-#include <sys/types.h>
-#include <sys/signal.h>
-#include <sys/ptrace.h>
-
-int ptrace(int \fIrequest\fP, pid_t \fIpid\fP, long \fIaddr\fP, long \fIdata\fP)
-.ft R
-.fi
-.SH DESCRIPTION
-.ft B
-Note: This manual page has no relation to MINIX 3.  Someone who knows ptrace()
-has to check, or rewrite, this page.  (kjb)
-.ft R
-.PP
-.B Ptrace
-provides a means by which a parent process
-may control the execution of a child process,
-and examine and change its core image.
-Its primary use is for the implementation of breakpoint debugging.
-There are four arguments whose interpretation
-depends on a
-.I request
-argument.
-Generally,
-.I pid
-is the process ID of the traced process,
-which must be a child (no more distant descendant)
-of the tracing process.
-A process being traced
-behaves normally until it encounters some signal
-whether internally generated
-like \*(lqillegal instruction\*(rq or externally
-generated like \*(lqinterrupt\*(rq.
-See
-.BR sigaction (2)
-for the list.
-Then the traced process enters a stopped state
-and its parent is notified via
-.BR  wait (2).
-When the child is in the stopped state,
-its core image can be examined and modified
-using
-.BR ptrace .
-If desired, another
-.B ptrace
-request can then cause the child either to terminate
-or to continue, possibly ignoring the signal.
-.PP
-The value of the
-.I request
-argument determines the precise
-action of the call:
-.TP 4
-PT_TRACE_ME
-This request is the only one used by the child process;
-it declares that the process is to be traced by its parent.
-All the other arguments are ignored.
-Peculiar results will ensue
-if the parent does not expect to trace the child.
-.TP 4
-PT_READ_I, PT_READ_D
-The
-word in the child process's address space
-at
-.I addr
-is returned.
-If I and D space are separated (e.g. historically
-on a pdp-11), request PT_READ_I indicates I space,
-PT_READ_D D space.
-.I Addr
-must be even on some machines.
-The child must be stopped.
-The input
-.I data
-is ignored.
-.TP 4
-PT_READ_U
-The word
-of the system's per-process data area corresponding to
-.I addr
-is returned.
-.I Addr
-must be even on some machines and less than 512.
-This space contains the registers and other information about
-the process;
-its layout corresponds to the
-.I user
-structure in the system.
-.TP 4
-PT_WRITE_I, PT_WRITE_D
-The
-given
-.I data
-is written at the word in the process's address space corresponding to
-.I addr,
-which must be even on some machines.
-No useful value is returned.
-If I and D space are separated, request PT_WRITE_I indicates I space, 
-PT_WRITE_D D space.
-Attempts to write in pure procedure
-fail if another process is executing the same file.
-.TP 4
-PT_WRITE_U
-The process's system data is written,
-as it is read with request PT_READ_U.
-Only a few locations can be written in this way:
-the general registers,
-the floating point status and registers,
-and certain bits of the processor status word.
-.TP 4
-PT_CONTINUE
-The
-.I data
-argument is taken as a signal number
-and the child's execution continues
-at location
-.I addr
-as if it had incurred that signal.
-Normally the signal number will be
-either 0 to indicate that the signal that caused the stop
-should be ignored,
-or that value fetched out of the
-process's image indicating which signal caused
-the stop.
-If
-.I addr
-is (int *)1 then execution continues from where it stopped.
-.TP 4
-PT_KILL
-The traced process terminates.
-.TP 4
-PT_STEP
-Execution continues as in request PT_CONTINUE;
-however, as soon as possible after execution of at least one instruction,
-execution stops again.
-The signal number from the stop is
-SIGTRAP.
-(On the VAX-11 the T-bit is used and just one instruction
-is executed.)
-This is part of the mechanism for implementing breakpoints.
-.PP
-As indicated,
-these calls
-(except for request PT_TRACE_ME)
-can be used only when the subject process has stopped.
-The
-.B wait
-call is used to determine
-when a process stops;
-in such a case the \*(lqtermination\*(rq status
-returned by
-.B wait
-has the value 0177 to indicate stoppage rather
-than genuine termination.
-.PP
-To forestall possible fraud,
-.B ptrace
-inhibits the set-user-id and set-group-id facilities
-on subsequent
-.BR  execve (2)
-calls.
-If a traced process calls
-.BR execve ,
-it will stop before executing the first instruction of the new image
-showing signal SIGTRAP.
-.PP
-On a VAX-11, \*(lqword\*(rq also means a 32-bit integer,
-but the \*(lqeven\*(rq
-restriction does not apply.
-.SH "RETURN VALUE
-A 0 value is returned if the call succeeds.  If the call fails
-then a \-1 is returned and the global variable \fIerrno\fP is
-set to indicate the error.
-.SH "ERRORS
-.TP 15
-[EIO]
-The request code is invalid.
-.TP 15
-[ESRCH]
-The specified process does not exist.
-.TP 15
-[EIO]
-The given signal number is invalid.
-.TP 15
-[EIO]
-The specified address is out of bounds.
-.TP 15
-[EPERM]
-The specified process cannot be traced.
-.SH "SEE ALSO"
-.BR wait (2),
-.BR sigaction (2),
-.BR mdb (1).
-.SH BUGS
-.B Ptrace
-is unique and arcane; it should be replaced with a special file that
-can be opened and read and written.  The control functions could then
-be implemented with
-.BR ioctl (2)
-calls on this file.  This would be simpler to understand and have much
-higher performance.
-.PP
-The request PT_TRACE_ME call should be able to specify
-signals that are to be treated normally and not cause a stop.
-In this way, for example,
-programs with simulated floating point (which
-use \*(lqillegal instruction\*(rq signals at a very high rate)
-could be efficiently debugged.
-.PP
-The error indication, \-1, is a legitimate function value;
-.BR errno ,
-(see
-.BR intro (2)),
-can be used to disambiguate.
-.PP
-It should be possible to stop a process on occurrence of a system
-call;
-in this way a completely controlled environment could
-be provided.
Index: trunk/minix/man/man2/read.2
===================================================================
--- trunk/minix/man/man2/read.2	(revision 9)
+++ 	(revision )
@@ -1,83 +1,0 @@
-.\" Copyright (c) 1980 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)read.2	6.6 (Berkeley) 5/23/86
-.\"
-.TH READ 2 "May 23, 1986"
-.UC 4
-.SH NAME
-read \- read input
-.SH SYNOPSIS
-.nf
-.ft B
-#include <sys/types.h>
-#include <unistd.h>
-
-ssize_t read(int \fId\fP, void *\fIbuf\fP, size_t \fInbytes\fP)
-.fi
-.SH DESCRIPTION
-.B Read
-attempts to read
-.I nbytes
-of data from the object referenced by the descriptor
-.I d
-into the buffer pointed to by
-.IR buf .
-.PP
-On objects capable of seeking, the
-.B read
-starts at a position
-given by the pointer associated with
-.IR d 
-(see
-.BR lseek (2)).
-Upon return from
-.BR read ,
-the pointer is incremented by the number of bytes actually read.
-.PP
-Objects that are not capable of seeking always read from the current
-position.  The value of the pointer associated with such an
-object is undefined.
-.PP
-Upon successful completion,
-.B read
-return the number of bytes actually read and placed in the buffer.
-The system guarantees to read the number of bytes requested if
-the descriptor references a normal file that has that many bytes left
-before the end-of-file, but in no other case.
-.PP
-If the returned value is 0, then
-end-of-file has been reached.
-.SH "RETURN VALUE
-If successful, the
-number of bytes actually read is returned.
-Otherwise, a \-1 is returned and the global variable
-.B errno
-is set to indicate the error.
-.SH "ERRORS
-.B Read
-will fail if one or more of the following are true:
-.TP 15
-[EBADF]
-\fID\fP is not a valid descriptor open for reading.
-.TP 15
-[EFAULT]
-\fIBuf\fP points outside the allocated address space.
-.TP 15
-[EIO]
-An I/O error occurred while reading from the file system.
-.TP 15
-[EINTR]
-A read from a slow device was interrupted before
-any data arrived by the delivery of a signal.
-.TP 15
-[EAGAIN]
-The file was marked for non-blocking I/O,
-and no data were ready to be read.
-.SH "SEE ALSO"
-.BR dup (2),
-.BR fcntl (2),
-.BR open (2),
-.BR pipe (2),
-.BR write (2).
Index: trunk/minix/man/man2/readlink.2
===================================================================
--- trunk/minix/man/man2/readlink.2	(revision 9)
+++ 	(revision )
@@ -1,54 +1,0 @@
-.TH READLINK 2 "March 17, 2006"
-.UC 4
-.SH NAME
-readlink \- read the contents of a symlink
-.SH SYNOPSIS
-.nf
-.ft B
-#include <unistd.h>
-
-int readlink(const char *\fIpath\fP, char *\fIbuf\fP, size_t bufsize)
-.fi
-.ft R
-.SH DESCRIPTION
-The 
-.I readlink
-call reads the contents of the symlink
-.I name1
-and returns it in
-.I buf
-up to a maximum of
-.I bufsize
-bytes. A terminating NUL byte is NOT put in the buffer.
-.SH "RETURN VALUE
-Upon successful completion, a value of 0 is returned.  Otherwise,
-a value of \-1 is returned and
-.B errno
-is set to indicate the error.
-.SH "ERRORS
-.B Readlink
-will fail if one or more of the following are true:
-.TP 15
-[ENOTDIR]
-A component of either path prefix is not a directory.
-.TP 15
-[ENAMETOOLONG]
-A path name exceeds PATH_MAX characters.
-.TP 15
-[ENOENT]
-A component of the path does not exist.
-.TP 15
-[EACCES]
-A component of the path denies search permission.
-.TP 15
-[ELOOP]
-Too many symbolic links were encountered in translating one of the pathnames.
-.TP 15
-[ENOENT]
-The link named by \fIpath\fP does not exist.
-.TP 15
-[EFAULT]
-The buffer specified is outside the process's allocated address space.
-.SH "SEE ALSO"
-.BR symlink (2),
-.BR unlink (2).
Index: trunk/minix/man/man2/reboot.2
===================================================================
--- trunk/minix/man/man2/reboot.2	(revision 9)
+++ 	(revision )
@@ -1,62 +1,0 @@
-.TH REBOOT 2
-.SH NAME
-reboot \- close down the system or reboot
-.SH SYNTAX
-.ft B
-.nf
-#define _MINIX_SOURCE 1
-
-#include <unistd.h>
-
-int reboot(int \fIhow\fP, ...)
-.fi
-.ft P
-.SH DESCRIPTION
-.B Reboot()
-is used to close down the system.  It allows several ways of shutting
-down depending on
-.IR how :
-.PP
-.TP 5
-.BI "reboot(RBT_HALT)"
-Halt the system and return to the monitor prompt.
-.TP
-.BI "reboot(RBT_REBOOT)"
-Reboot the system by letting the monitor execute the "boot" command.
-.TP
-.BI "reboot(RBT_PANIC)"
-Cause a system panic.  This is not normally done from user mode, but by
-servers using the
-.B sys_abort()
-kernel call.
-.TP
-.BI "reboot(RBT_MONITOR" ", code, length" ")"
-Halt the system and let the monitor execute the given code of the given
-length.
-.RI ( code
-is of type
-.B "char *"
-and
-.I length
-of type
-.BR size_t .)
-.TP
-.BI "reboot(RBT_RESET)"
-Reboot the system with a hardware reset.
-.PP
-.B Reboot()
-may only be executed by the super-user.
-.SH DIAGNOSTICS
-If the call succeeds, it never returns.  If something went wrong,
-the return value is -1 and an error is indicated by
-.BR errno .
-.SH SEE ALSO
-.BR shutdown (8),
-.BR reboot (8),
-.BR halt (8),
-.BR sync (2).
-.SH NOTES
-MINIX 3 can not return to the monitor if running in real mode.  This means
-that most of the reboot functions will change to a system reset.
-.SH AUTHOR
-Edvard Tuinder (v892231@si.hhs.NL)
Index: trunk/minix/man/man2/rename.2
===================================================================
--- trunk/minix/man/man2/rename.2	(revision 9)
+++ 	(revision )
@@ -1,135 +1,0 @@
-.\" Copyright (c) 1983 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)rename.2	6.4 (Berkeley) 5/22/86
-.\"
-.TH RENAME 2 "May 22, 1986"
-.UC 5
-.SH NAME
-rename \- change the name of a file
-.SH SYNOPSIS
-.ft B
-.nf
-#include <stdio.h>
-
-int rename(const char *\fIfrom\fP, const char *\fIto\fP)
-.fi
-.ft R
-.SH DESCRIPTION
-.B Rename
-causes the link named
-.I from
-to be renamed as
-.IR to .
-If 
-.I to
-exists, then it is first removed.
-Both 
-.I from
-and
-.I to
-must be of the same type (that is, both directories or both
-non-directories), and must reside on the same file system.
-.PP
-.B Rename
-guarantees that an instance of
-.I to
-will always exist, even if the system should crash in
-the middle of the operation.
-.PP
-If the final component of
-.I from
-is a symbolic link,
-the symbolic link is renamed,
-not the file or directory to which it points.
-.SH "RETURN VALUE"
-A 0 value is returned if the operation succeeds, otherwise
-.B rename
-returns \-1 and the global variable 
-.B errno
-indicates the reason for the failure.
-.SH "ERRORS
-.B Rename
-will fail and neither of the argument files will be
-affected if any of the following are true:
-.TP 15
-[ENAMETOOLONG]
-A path name exceeds PATH_MAX characters.
-.TP 15
-[ENOENT]
-A component of the \fIfrom\fP path does not exist,
-or a path prefix of \fIto\fP does not exist.
-.TP 15
-[EACCES]
-A component of either path prefix denies search permission.
-.TP 15
-[EACCES]
-The requested link requires writing in a directory with a mode
-that denies write permission.
-.TP 15
-[EPERM]
-The directory containing \fIfrom\fP is marked sticky,
-and neither the containing directory nor \fIfrom\fP
-are owned by the effective user ID.
-.TP 15
-[EPERM]
-The \fIto\fP file exists,
-the directory containing \fIto\fP is marked sticky,
-and neither the containing directory nor \fIto\fP
-are owned by the effective user ID.
-.TP 15
-[ELOOP]
-Too many symbolic links were encountered in translating either pathname.
-(Minix-vmd)
-.TP 15
-[ENOTDIR]
-A component of either path prefix is not a directory.
-.TP 15
-[ENOTDIR]
-.I From
-is a directory, but \fIto\fP is not a directory.
-.TP 15
-[EISDIR]
-.I To
-is a directory, but \fIfrom\fP is not a directory.
-.TP 15
-[EXDEV]
-The link named by \fIto\fP and the file named by \fIfrom\fP
-are on different logical devices (file systems).
-.TP 15
-[ENOSPC]
-The directory in which the entry for the new name is being placed
-cannot be extended because there is no space left on the file
-system containing the directory.
-.ig
-.TP 15
-[EDQUOT]
-The directory in which the entry for the new name
-is being placed cannot be extended because the
-user's quota of disk blocks on the file system
-containing the directory has been exhausted.
-..
-.TP 15
-[EIO]
-An I/O error occurred while making or updating a directory entry.
-.TP 15
-[EROFS]
-The requested link requires writing in a directory on a read-only file
-system.
-.TP 15
-[EFAULT]
-.I Path
-points outside the process's allocated address space.
-.TP 15
-[EINVAL]
-.I From
-is a parent directory of
-.IR to ,
-or an attempt is made to rename ``.'' or ``..''.
-.TP 15
-[ENOTEMPTY]
-.I To
-is a directory and is not empty.
-.SH "SEE ALSO"
-.BR open (2)
Index: trunk/minix/man/man2/rmdir.2
===================================================================
--- trunk/minix/man/man2/rmdir.2	(revision 9)
+++ 	(revision )
@@ -1,77 +1,0 @@
-.\" Copyright (c) 1983 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)rmdir.2	6.3 (Berkeley) 8/26/85
-.\"
-.TH RMDIR 2 "August 26, 1985"
-.UC 5
-.SH NAME
-rmdir \- remove a directory file
-.SH SYNOPSIS
-.nf
-.ft B
-#include <unistd.h>
-
-int rmdir(const char *\fIpath\fP)
-.fi
-.ft R
-.SH DESCRIPTION
-.B Rmdir
-removes a directory file
-whose name is given by
-.I path.
-The directory must not have any entries other
-than \*(lq.\*(rq and \*(lq..\*(rq.
-.SH "RETURN VALUE
-A 0 is returned if the remove succeeds; otherwise a \-1 is
-returned and an error code is stored in the global location \fIerrno\fP\|.
-.SH ERRORS
-The named file is removed unless one or more of the
-following are true:
-.TP 15
-[ENOTDIR]
-A component of the path is not a directory.
-.TP 15
-[ENAMETOOLONG]
-The path name exceeds PATH_MAX characters.
-.TP 15
-[ENOENT]
-The named directory does not exist.
-.TP 15
-[ELOOP]
-Too many symbolic links were encountered in translating the pathname.
-(Minix-vmd)
-.TP 15
-[ENOTEMPTY]
-The named directory contains files other than ``.'' and ``..'' in it.
-.TP 15
-[EACCES]
-Search permission is denied for a component of the path prefix.
-.TP 15
-[EACCES]
-Write permission is denied on the directory containing the link
-to be removed.
-.TP 15
-[EPERM]
-The directory containing the directory to be removed is marked sticky,
-and neither the containing directory nor the directory to be removed
-are owned by the effective user ID.
-.TP 15
-[EBUSY]
-The directory to be removed is the mount point
-for a mounted file system.
-.TP 15
-[EIO]
-An I/O error occurred while deleting the directory entry
-or deallocating the inode.
-.TP 15
-[EROFS]
-The directory entry to be removed resides on a read-only file system.
-.TP 15
-[EFAULT]
-.I Path
-points outside the process's allocated address space.
-.SH "SEE ALSO"
-.BR mkdir (2),
-.BR unlink (2).
Index: trunk/minix/man/man2/select.2
===================================================================
--- trunk/minix/man/man2/select.2	(revision 9)
+++ 	(revision )
@@ -1,43 +1,0 @@
-.TH SELECT 2 "Jun 9, 2005"
-.UC 4
-.SH NAME
-select, FD_CLR, FD_ISSET, FD_SET, FD_ZERO \- synchronous I/O multiplexing
-.SH SYNOPSIS
-.nf
-.ft B
-#include <sys/select.h>
-
-int select(int \fInfds\fP, fd_set *\fIreadfds\fP, fd_set *\fIwritefds\fP, fd_set *\fIerrorfds\fP, struct timeval *\fItimeout\fP)
-
-void FD_CLR(int \fIfd\fP, fd_set *\fIfdset\fP)
-int FD_ISSET(int \fIfd\fP, fd_set *\fIfdset\fP)
-void FD_SET(int \fIfd\fP, fd_set *\fIfdset\fP)
-void FD_ZERO(fd_set *\fIfdset\fP)
-.ft R
-.fi
-.SH DESCRIPTION
-.B Select
-examines the file descriptors given in the sets 
-.IR readfds ,
-.IR writefds ,
-and
-.IR errorfds ,
-up to and including file descriptor
-.IR nfds -1
-, for reading, writing, or exceptional conditions, respectively.
-.B Select
-currently supports regular files, pipes, named pipes,
-inet, and tty file descriptors (including pty).
-
-If the 
-.I readfds 
-argument is not a null pointer, it points to an object of type fd_set
-that on input specifies the file descriptors to be checked for being
-ready to read, and on output indicates which file descriptors are ready
-to read.
-.I Writefds 
-and
-.I errorfds
-have an analogous meaning for file descriptors to be checked for being
-ready to read, respectively have pending exceptional (error) conditions.
-
Index: trunk/minix/man/man2/setsid.2
===================================================================
--- trunk/minix/man/man2/setsid.2	(revision 9)
+++ 	(revision )
@@ -1,40 +1,0 @@
-.TH SETSID 2
-.SH NAME
-setsid, getpgrp \- create process group, get process group id
-.SH SYNOPSIS
-.ft B
-.nf
-#include <sys/types.h>
-#include <unistd.h>
-
-pid_t setsid(void)
-pid_t getpgrp(void)
-.fi
-.ft P
-.SH DESCRIPTION
-.B Setsid()
-creates a new session if the calling process is not already a session
-leader.  The calling process becomes the session leader of a new process
-group and the process group ID of this new process group will be equal to
-the process ID of the new session leader.  The process group ID is inherited
-on a
-.BR fork (2).
-.PP
-.B Getpgrp()
-returns the process group ID of the calling process.
-.SH "SEE ALSO"
-.BR kill (2),
-.BR termios (3),
-.BR tty (4).
-.SH DIAGNOSTICS
-.B Setsid()
-returns the new process group ID on success, or \-1 with
-.B errno
-set to
-.B EPERM
-if the process is already a session leader.
-.SH AUTHOR
-Kees J. Bot (kjb@cs.vu.nl)
-
-.\"
-.\" $PchId: setsid.2,v 1.2 1996/04/11 06:06:36 philip Exp $
Index: trunk/minix/man/man2/setuid.2
===================================================================
--- trunk/minix/man/man2/setuid.2	(revision 9)
+++ 	(revision )
@@ -1,52 +1,0 @@
-.\" Copyright (c) 1980 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)setreuid.2	6.1 (Berkeley) 5/9/85
-.\"
-.TH SETUID 2 "May 9, 1985"
-.UC 4
-.SH NAME
-setuid, seteuid, setgid, setegid \- set (effective) user or group ID's
-.SH SYNOPSIS
-.nf
-.ft B
-#include <sys/types.h>
-
-int setuid(uid_t \fIuid\fP)
-int seteuid(uid_t \fIeuid\fP)
-int setgid(gid_t \fIgid\fP)
-int setegid(gid_t \fIegid\fP)
-.ft R
-.fi
-.SH DESCRIPTION
-.B Setuid
-sets the real and effective user ID's of the
-current process to
-.IR uid .
-Unprivileged users may only change both user ID's
-to the real user ID; only the super-user may
-make other changes.
-.B Setgid
-does the same for the real and effective group ID's.
-.PP
-Minix-vmd
-allows an unprivileged user to change ID's to the original real or effective
-ID as they were at the time the process was executed.
-.B Setgid
-may also set the group ID's to any of the additional group ID's.
-If one of the
-remembered user ID's was 0 then any user or group ID may be chosen.
-.SH "RETURN VALUE
-Upon successful completion, a value of 0 is returned.  Otherwise,
-a value of \-1 is returned and \fBerrno\fP is set to indicate the error.
-.SH "ERRORS
-.TP 15
-[EPERM]
-The current process is not the super-user and a change
-other than one of the allowed changes was attempted.
-.SH "SEE ALSO"
-.BR getuid (2),
-.BR geteuid (2),
-.BR getgid (2).
-.BR getegid (2).
Index: trunk/minix/man/man2/sigaction.2
===================================================================
--- trunk/minix/man/man2/sigaction.2	(revision 9)
+++ 	(revision )
@@ -1,244 +1,0 @@
-.TH SIGACTION 2
-.SH NAME
-sigaction, signal \- manage signal state and handlers
-.SH SYNOPSIS
-.ft B
-#include <signal.h>
-
-.in +5
-.ti -5
-int sigaction(int \fIsig\fP, const struct sigaction *\fIact\fP, struct sigaction *\fIoact\fP)
-.in -5
-.br
-void (*signal(int \fIsig\fP, void (*\fIhandler\fP)(int)))(int);
-.ft P
-.SH DESCRIPTION
-.de SP
-.if t .sp 0.4
-.if n .sp
-..
-.B Sigaction()
-is used to examine, set, or modify the attributes of a signal.  The argument
-.I sig
-is the signal in question.  The
-.I act
-argument points to a structure containing the new attributes of the signal,
-the structure pointed to by
-.I oact
-will receive the old attributes that were in effect before the call.
-.PP
-The
-.I act
-and
-.I oact
-arguments may be
-.B NULL
-to indicate that either no new attributes are to be set, or that the old
-attributes are not of interest.
-.PP
-The structure containing the signal attributes is defined in <signal.h> and
-looks like this:
-.PP
-.RS
-.nf
-.ft B
-.ta +4n +12n
-struct sigaction {
-	void	(*sa_handler)(int sig);
-	sigset_t	sa_mask;
-	int	sa_flags;
-};
-.ft R
-.fi
-.RE
-.PP
-The
-.B sa_handler
-field contains the address of a signal handler, a function that is called
-when the process is signalled, or one of these special constants:
-.PP
-.TP 12
-.B SIG_DFL
-Default signal handling is to be performed.  This usually means that the
-process is killed, but some signals may be ignored by default.
-.TP
-.B SIG_IGN
-Ignore the signal.
-.PP
-The
-.B sa_mask
-field indicates a set of signals that must be blocked when the signal is
-being handled.  Whether the signal
-.I sig
-itself is blocked when being handled is not controlled by this mask.  The
-mask is of a "signal set" type that is to be manipulated by the
-.BR sigset (3)
-functions.
-.PP
-How the signal is handled precisely is specified by bits in
-.BR sa_flags .
-If none of the flags is set then the handler is called when the signal
-arrives.  The signal is blocked during the call to the handler, and
-unblocked when the handler returns.  A system call that is interrupted
-returns
-.B \-1
-with
-.B errno
-set to
-.BR EINTR .
-The following bit flags can be set to modify this behaviour:
-.PP
-.TP 15
-.B SA_RESETHAND
-Reset the signal handler to
-.B SIG_DFL
-when the signal is caught.
-.TP
-.B SA_NODEFER
-Do not block the signal on entry to the handler.
-.TP
-.B SA_COMPAT
-Handle the signal in a way that is compatible with the the old
-.B signal()
-call.
-.PP
-The old
-.B signal()
-signal system call sets a signal handler for a given signal and returns the
-old signal handler.  No signals are blocked, the flags are
-.BR "SA_RESETHAND | SA_NODEFER | SA_COMPAT" .
-New code should not use
-.BR signal() .
-Note that
-.B signal()
-and all of the
-.B SA_*
-flags are MINIX 3 extensions.
-.PP
-Signal handlers are reset to
-.B SIG_DFL
-on an
-.BR execve (2).
-Signals that are ignored stay ignored.
-.SS Signals
-MINIX 3 knows about the following signals:
-.PP
-.nf
-.ta +11n +7n +8n
-signal	num	notes	description
-.SP
-SIGHUP	1	k	Hangup
-SIGINT	2	k	Interrupt (usually DEL or CTRL\-C)
-SIGQUIT	3	kc	Quit (usually CTRL\-\e)
-SIGILL	4	kc	Illegal instruction
-SIGTRAP	5	xkc	Trace trap
-SIGABRT	6	kc	Abort program
-SIGFPE	8	k	Floating point exception
-SIGKILL	9	k	Kill
-SIGUSR1	10	k	User defined signal #1
-SIGSEGV	11	kc	Segmentation fault
-SIGUSR2	12	k	User defined signal #2
-SIGPIPE	13	k	Write to a pipe with no reader
-SIGALRM	14	k	Alarm clock
-SIGTERM	15	k	Terminate (default for kill(1))
-SIGCHLD	17	pvi	Child process terminated
-SIGCONT	18	p	Continue if stopped
-SIGSTOP	19	ps	Stop signal
-SIGTSTP	20	ps	Interactive stop signal
-SIGTTIN	21	ps	Background read
-SIGTTOU	22	ps	Background write
-SIGWINCH	23	xvi	Window size change
-.ft R
-.fi
-.PP
-The letters in the notes column indicate:
-.PP
-.TP 5
-.B k
-The process is killed if the signal is not caught.
-.TP
-.B c
-The signal causes a core dump.
-.TP
-.B i
-The signal is ignored if not caught.
-.TP
-.B v
-Only Minix-vmd implements this signal.
-.TP
-.B x
-MINIX 3 extension, not defined by \s-2POSIX\s+2.
-.TP
-.B p
-These signals are not implemented, but \s-2POSIX\s+2 requires that they are
-defined.
-.TP
-.B s
-The process should be stopped, but is killed instead.
-.PP
-The
-.B SIGKILL
-signal cannot be caught or ignored.  The
-.B SIGILL
-and
-.B SIGTRAP
-signals cannot be automatically reset.  The system silently enforces these
-restrictions.  This may or may not be reflected by the attributes of these
-signals and the signal masks.
-.SS Types
-\s-2POSIX\s+2 prescribes that <sys/types.h> has the following definition:
-.PP
-.RS
-.B "typedef int (*sighandler_t)(int)"
-.RE
-.PP
-With this type the following declarations can be made:
-.PP
-.RS
-.ft B
-.nf
-sighandler_t sa_handler;
-sighandler_t signal(int \fIsig\fP, sighandler_t \fIhandler\fP);
-.fi
-.ft R
-.RE
-.PP
-This may help you to understand the earlier declarations better.  The
-.B sighandler_t
-type is also very useful in old style C code that is compiled by a compiler
-for standard C.
-.SH "SEE ALSO"
-.BR kill (1),
-.BR kill (2),
-.BR pause (2),
-.BR sigprocmask (2),
-.BR sigsuspend (2),
-.BR sigpending (2),
-.BR sigset (3).
-.SH DIAGNOSTICS
-.B Sigaction()
-returns
-.B 0
-on success or
-.B \-1
-on error.
-.B Signal()
-returns the old handler on success or
-.B SIG_ERR
-on error.  The error code may be:
-.PP
-.TP 10
-.B EINVAL
-Bad signal number.
-.TP
-.B EFAULT
-Bad
-.I act
-or
-.I oact
-addresses.
-.SH AUTHOR
-Kees J. Bot (kjb@cs.vu.nl)
-
-.\"
-.\" $PchId: sigaction.2,v 1.2 1996/04/11 06:00:28 philip Exp $
Index: trunk/minix/man/man2/sigpending.2
===================================================================
--- trunk/minix/man/man2/sigpending.2	(revision 9)
+++ 	(revision )
@@ -1,33 +1,0 @@
-.TH SIGPENDING 2
-.SH NAME
-sigpending \- report pending signals
-.SH SYNOPSIS
-.ft B
-#include <signal.h>
-
-int sigpending(sigset_t *\fIset\fP)
-.ft P
-.SH DESCRIPTION
-.B Sigpending()
-returns the set of signals that are waiting to be delivered.  They are
-currently blocked by the signal mask.
-.SH "SEE ALSO"
-.BR sigaction (2),
-.BR sigprocmask (2),
-.BR sigsuspend (2),
-.BR sigset (3).
-.SH DIAGNOSTICS
-Returns
-.B 0
-on success and
-.B \-1
-on error.  The only possible error code is
-.B EFAULT
-for a bad
-.I set
-address.
-.SH AUTHOR
-Kees J. Bot (kjb@cs.vu.nl)
-
-.\"
-.\" $PchId: sigpending.2,v 1.2 1996/04/11 06:01:22 philip Exp $
Index: trunk/minix/man/man2/sigprocmask.2
===================================================================
--- trunk/minix/man/man2/sigprocmask.2	(revision 9)
+++ 	(revision )
@@ -1,75 +1,0 @@
-.TH SIGPROCMASK 2
-.SH NAME
-sigprocmask \- manipulate the signal mask
-.SH SYNOPSIS
-.ft B
-#include <signal.h>
-
-int sigprocmask(int \fIhow\fP, const sigset_t *\fIset\fP, sigset_t *\fIoset\fP)
-.ft P
-.SH DESCRIPTION
-.B Sigprocmask()
-examines or manipulates the signal mask.  This mask is the set of signals
-that are currently blocked.  The
-.I how
-argument determines the action that must be performed.  In all cases the
-signal set referenced by
-.IR oset ,
-if not
-.BR NULL ,
-will be used to receive the old signal mask.  The
-.I set
-argument, if not
-.BR NULL ,
-will be used to set or modify the current signal mask.
-.PP
-.I How
-can be one of:
-.PP
-.TP 15
-.B SIG_BLOCK
-Add the signals referenced by
-.I set
-to the mask.
-.TP
-.B SIG_UNBLOCK
-Remove the signals referenced by
-.I set
-from the mask.
-.TP
-.B SIG_SETMASK
-Set the signal mask to the set referenced by
-.IR set .
-.PP
-The value of
-.I how
-is ignored if
-.I set
-is
-.BR NULL .
-.SH "SEE ALSO"
-.BR sigaction (2),
-.BR sigpending (2),
-.BR sigsuspend (2),
-.BR sigset (3).
-.SH DIAGNOSTICS
-Returns
-.B 0
-on success and
-.B \-1
-on error.  The error code is
-.B EFAULT
-for a bad
-.I set
-or
-.I oset
-address, or
-.B EINVAL
-for a bad
-.I how
-argument.
-.SH AUTHOR
-Kees J. Bot (kjb@cs.vu.nl)
-
-.\"
-.\" $PchId: sigprocmask.2,v 1.2 1996/04/11 06:02:09 philip Exp $
Index: trunk/minix/man/man2/sigsuspend.2
===================================================================
--- trunk/minix/man/man2/sigsuspend.2	(revision 9)
+++ 	(revision )
@@ -1,39 +1,0 @@
-.TH SIGSUSPEND 2
-.SH NAME
-sigsuspend \- suspend until signalled
-.SH SYNOPSIS
-.ft B
-#include <signal.h>
-
-int sigsuspend(const sigset_t *\fIset\fP)
-.ft P
-.SH DESCRIPTION
-.B Sigsuspend()
-installs the signal mask referenced by
-.I set
-and suspends the process until signalled.  The signal is handled, the signal
-mask is restored to the value it had before the
-.B sigsuspend()
-call and call returns.
-.SH "SEE ALSO"
-.BR pause (2),
-.BR sigaction (2),
-.BR sigpending (2),
-.BR sigprocmask (2),
-.BR sigset (3).
-.SH DIAGNOSTICS
-.B Sigsuspend()
-never returns normally, so it always returns
-.BR \-1 .
-The error code is either
-.B EINTR
-indicating that a signal has arrived, or
-.B EFAULT
-for a bad
-.I set
-address.
-.SH AUTHOR
-Kees J. Bot (kjb@cs.vu.nl)
-
-.\"
-.\" $PchId: sigsuspend.2,v 1.2 1996/04/11 06:02:41 philip Exp $
Index: trunk/minix/man/man2/stat.2
===================================================================
--- trunk/minix/man/man2/stat.2	(revision 9)
+++ 	(revision )
@@ -1,179 +1,0 @@
-.\" Copyright (c) 1980 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)stat.2	6.5 (Berkeley) 5/12/86
-.\"
-.TH STAT 2 "May 12, 1986"
-.UC 4
-.SH NAME
-stat, lstat, fstat \- get file status
-.SH SYNOPSIS
-.nf
-.ft B
-#include <sys/types.h>
-#include <sys/stat.h>
-
-.ta +54n
-int stat(const char *\fIpath\fP, struct stat *\fIbuf\fP)
-int lstat(const char *\fIpath\fP, struct stat *\fIbuf\fP)	
-int fstat(int \fIfd\fP, struct stat *\fIbuf\fP)
-.fi
-.ft R
-.SH DESCRIPTION
-.B Stat
-obtains information about the file
-.IR path .
-Read, write or execute
-permission of the named file is not required, but all directories
-listed in the path name leading to the file must be reachable.
-.PP
-.B Lstat
-is like \fBstat\fP except in the case where the named file is a symbolic link,
-in which case
-.B lstat
-returns information about the link,
-while
-.B stat
-returns information about the file the link references.
-.PP
-.B Fstat
-obtains the same information about an open file
-referenced by the argument descriptor, such as would
-be obtained by an \fBopen\fP call.  Pipe descriptors
-look like named pipes with a link count of zero.  The
-st_size field of pipes or named pipes shows the amount of
-bytes currently buffered in the pipe.
-.PP
-.I Buf
-is a pointer to a
-.B stat
-structure into which information is placed concerning the file.
-The contents of the structure pointed to by
-.I buf
-is as follows:
-.PP
-.if t .RS
-.nf
-.ta +0.4i +0.8i +1i
-struct stat {
-	dev_t	st_dev;	/* device inode resides on */
-	ino_t	st_ino;	/* this inode's number */
-	mode_t	st_mode;	/* file mode, protection bits, etc. */
-	nlink_t	st_nlink;	/* number or hard links to the file */
-	uid_t	st_uid;	/* user-id of the file's owner */
-	gid_t	st_gid;	/* group-id of the file's owner */
-	dev_t	st_rdev;	/* the device type, for inode that is device */
-	off_t	st_size;	/* total size of file */
-	time_t	st_atime;	/* time of last access */
-	time_t	st_mtime;	/* time of last data modification */
-	time_t	st_ctime;	/* time of last file status change */
-};
-.fi
-.if t .RE
-.DT
-.PP
-.TP 12
-st_atime
-Time when file data was last read or modified.  Changed by the following system
-calls:
-.BR mknod (2),
-.BR utime (2),
-.BR read (2),
-and
-.BR write (2).
-For reasons of efficiency, 
-st_atime is not set when a directory
-is searched, although this would be more logical.
-.TP 12
-st_mtime
-Time when data was last modified.
-It is not set by changes of owner, group, link count, or mode.
-Changed by the following system calls:
-.BR mknod (2),
-.BR utime (2),
-.BR write (2).
-.TP 12
-st_ctime
-Time when file status was last changed.
-It is set both both by writing and changing the i-node.
-Changed by the following system calls:
-.BR chmod (2)
-.BR chown (2),
-.BR link (2),
-.BR mknod (2),
-.BR rename (2),
-.BR unlink (2),
-.BR utime (2),
-.BR write (2).
-.PP
-The file type information in \fBst_mode\fP has bits:
-.PP
-.nf
-.in +5n
-.ta 1.6i 2.5i 3i
-#define S_IFMT	0170000	/* type of file */
-#define\ \ \ \ S_IFIFO	0010000	/* named pipe */
-#define\ \ \ \ S_IFCHR	0020000	/* character special */
-#define\ \ \ \ S_IFDIR	0040000	/* directory */
-#define\ \ \ \ S_IFBLK	0060000	/* block special */
-#define\ \ \ \ S_IFREG	0100000	/* regular */
-#define\ \ \ \ S_IFLNK	0120000	/* symbolic link */
-.fi
-.in -5n
-.PP
-The mode bits 0007777 encode set-uid/gid bits and
-permission bits (see
-.BR chmod (2)).
-.SH "RETURN VALUE
-Upon successful completion a value of 0 is returned.
-Otherwise, a value of \-1 is returned and
-.B errno
-is set to indicate the error.
-.SH "ERRORS
-.B Stat
-and
-.B lstat
-will fail if one or more of the following are true:
-.TP 15
-[ENOTDIR]
-A component of the path prefix is not a directory.
-.TP 15
-[ENAMETOOLONG]
-The path name exceeds PATH_MAX characters.
-.TP 15
-[ENOENT]
-The named file does not exist.
-.TP 15
-[EACCES]
-Search permission is denied for a component of the path prefix.
-.TP 15
-[ELOOP]
-Too many symbolic links were encountered in translating the pathname.
-.TP 15
-[EFAULT]
-.I Buf
-or
-.I name
-points to an invalid address.
-.TP 15
-[EIO]
-An I/O error occurred while reading from or writing to the file system.
-.PP
-.B Fstat
-will fail if one or both of the following are true:
-.TP 15
-[EBADF]
-.I Fildes
-is not a valid open file descriptor.
-.TP 15
-[EFAULT]
-.I Buf
-points to an invalid address.
-.TP 15
-[EIO]
-An I/O error occurred while reading from or writing to the file system.
-.SH "SEE ALSO"
-.BR chmod (2),
-.BR chown (2),
-.BR utime (2).
Index: trunk/minix/man/man2/svrctl.2
===================================================================
--- trunk/minix/man/man2/svrctl.2	(revision 9)
+++ 	(revision )
@@ -1,59 +1,0 @@
-.\" svrctl.2
-.\"
-.\" Created: July, 1994 by Philip Homburg <philip@cs.vu.nl>
-.TH svrctl 2
-.SH NAME
-svrctl \- special server control functions
-.SH SYNOPSIS
-.nf
-.ft B
-#include <sys/svrctl.h>
-
-int svrctl(u32_t \fIrequest\fP, void *\fIdata\fP);
-.ft R
-.fi
-.SH DESCRIPTION
-.B Svrctl
-allows root to control the kernel in various ways, or implements some very
-MINIX 3 specific system calls that don't deserve their own system call number.
-.PP
-This system call makes it easy to add new ways of setting and getting kernel
-parameters, but at the same time, backwards compatibility is not guaranteed.
-Read the <sys/svrctl.h> include file to see what the struct's mentioned below
-look like.  Most calls are root-only, unless specified otherwise.
-.PP
-The only way to know how to properly use these calls is to study the
-associated kernel or server code, or the programs that already use these
-calls.
-.PP
-Current requests are:
-.TP 5
-.B MMSIGNON
-Inform MM that the current process wants to become a server.
-.TP
-.B MMSWAPON
-Instruct MM to mount a file or device as swapspace.
-.TP
-.B MMSWAPOFF
-Tell MM to stop using swapspace.
-.TP
-.B FSSIGNON
-Register a new device with FS.
-.ig
-.TP
-.B FSDEVMAP
-Translate a device number to a task number, minor device pair using a
-\fBstruct fsdevmap\fP
-..
-.TP
-.B SYSSIGNON
-Inform the kernel that the process want to become a server.
-The processes task number is filled-in in a \fBstruct systaskinfo\fP.
-.TP
-.B SYSGETENV
-Request the value of one or all boot parameters.  Can be used by non-root.
-.SH "RETURN VALUES"
-.B Svrctl
-returns 0 upon success and -1 upon failure.
-.SH AUTHOR
-Philip Homburg <philip@cs.vu.nl>
Index: trunk/minix/man/man2/symlink.2
===================================================================
--- trunk/minix/man/man2/symlink.2	(revision 9)
+++ 	(revision )
@@ -1,77 +1,0 @@
-.TH SYMLINK 2 "March 17, 2006"
-.UC 4
-.SH NAME
-symlink \- make a symbolic link to a file
-.SH SYNOPSIS
-.nf
-.ft B
-#include <unistd.h>
-
-int symlink(const char *\fIname1\fP, const char *\fIname2\fP)
-.fi
-.ft R
-.SH DESCRIPTION
-A symbolic link
-.I name2
-is created.
-The link has the name
-.IR name1 .
-.SH "RETURN VALUE
-Upon successful completion, a value of 0 is returned.  Otherwise,
-a value of \-1 is returned and
-.B errno
-is set to indicate the error.
-.SH "ERRORS
-.B Symlink
-will fail and no link will be created if one or more of the following
-are true:
-.TP 15
-[ENOTDIR]
-A component of either path prefix is not a directory.
-.TP 15
-[ENAMETOOLONG]
-A path name exceeds PATH_MAX characters.
-.TP 15
-[ENOENT]
-A component of either path prefix does not exist.
-.TP 15
-[EACCES]
-A component of either path prefix denies search permission.
-.TP 15
-[EACCES]
-The requested link requires writing in a directory with a mode
-that denies write permission.
-.TP 15
-[ELOOP]
-Too many symbolic links were encountered in translating one of the pathnames.
-.TP 15
-[EEXIST]
-The link named by \fIname2\fP exists.
-.TP 15
-[ENOSPC]
-The directory in which the entry for the new link is being placed
-cannot be extended because there is no space left on the file
-system containing the directory.
-.ig
-.TP 15
-[EDQUOT]
-The directory in which the entry for the new link
-is being placed cannot be extended because the
-user's quota of disk blocks on the file system
-containing the directory has been exhausted.
-..
-.TP 15
-[EIO]
-An I/O error occurred while reading from or writing to 
-the file system to make the directory entry.
-.TP 15
-[EROFS]
-The requested link requires writing in a directory on a read-only file
-system.
-.TP 15
-[EFAULT]
-One of the pathnames specified
-is outside the process's allocated address space.
-.SH "SEE ALSO"
-.BR link (2),
-.BR unlink (2).
Index: trunk/minix/man/man2/sync.2
===================================================================
--- trunk/minix/man/man2/sync.2	(revision 9)
+++ 	(revision )
@@ -1,32 +1,0 @@
-.\" Copyright (c) 1980 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)sync.2	6.2 (Berkeley) 6/30/85
-.\"
-.TH SYNC 2 "June 30, 1985"
-.UC 4
-.SH NAME
-sync, fsync \- update dirty buffers and super-block
-.SH SYNOPSIS
-.nf
-.ft B
-#include <unistd.h>
-
-int sync(void)
-int fsync(fd)
-.ft R
-.fi
-.SH DESCRIPTION
-.B Sync
-causes all information in the file system
-buffers that should be on disk to be written out.
-This includes modified super blocks,
-modified i-nodes, and delayed block I/O.
-.B
-Fsync
-does the same thing, but only for the blocks associated with a specific
-file descriptor. Under minix, currently the two calls do the same thing.
-.SH "SEE ALSO"
-.BR reboot (2),
-.BR sync (8).
Index: trunk/minix/man/man2/time.2
===================================================================
--- trunk/minix/man/man2/time.2	(revision 9)
+++ 	(revision )
@@ -1,62 +1,0 @@
-.\" Copyright (c) 1980 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)gettimeofday.2	6.7 (Berkeley) 5/14/86
-.\"
-.TH TIME 2 "May 14, 1986"
-.UC 4
-.SH NAME
-time, stime \- get/set date and time
-.SH SYNOPSIS
-.nf
-.ft B
-#include <sys/types.h>
-#include <time.h>
-
-time_t time(time_t *\fItp\fP)
-int stime(time_t *\fItp\fP)
-.fi
-.SH DESCRIPTION
-The system's notion of the current Greenwich time
-is obtained with the
-.B time
-call, and set with the
-.B stime
-call.
-The time is expressed
-in seconds since midnight (0 hour), January 1, 1970.
-The time is both returned by
-.B time
-and stored in the variable pointed to by
-.I tp
-unless
-.I tp
-is the null pointer.
-.PP
-.B Stime
-obtains the time to set from the variable pointed to by
-.IR tp .
-.PP
-Only the super-user may set the time of day.
-.SH RETURN
-A 0 return value from
-.B stime
-indicates that the call succeeded.
-.B Time
-returns the current time on success.
-A \-1 return value indicates an error occurred, and in this
-case an error code is stored into the global variable \fBerrno\fP.
-.SH "ERRORS
-The following error codes may be set in \fBerrno\fP:
-.TP 15
-[EFAULT]
-The
-.I tp
-address referenced invalid memory.
-.TP 15
-[EPERM]
-A user other than the super-user attempted to set the time.
-.SH "SEE ALSO"
-.BR date (1),
-.BR ctime (3).
Index: trunk/minix/man/man2/times.2
===================================================================
--- trunk/minix/man/man2/times.2	(revision 9)
+++ 	(revision )
@@ -1,68 +1,0 @@
-.\" Copyright (c) 1980 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)times.3c	6.1 (Berkeley) 5/9/85
-.\"
-.TH TIMES 2 "May 9, 1985"
-.UC 4
-.SH NAME
-times \- get process times
-.SH SYNOPSIS
-.nf
-.ft B
-#include <sys/types.h>
-#include <sys/times.h>
-#include <time.h>
-
-int times(struct tms *\fIbuffer\fP)
-.fi
-.SH DESCRIPTION
-.B Times
-returns time-accounting information
-for the current process
-and for the terminated child processes
-of the current process.
-All times are in 1/CLOCKS_PER_SEC seconds.
-.PP
-This is the structure returned by
-.BR times :
-.PP
-.RS
-.nf
-.ta +0.4i +0.8i +1.2i
-struct tms {
-	clock_t	tms_utime;	/* user time for this process */
-	clock_t	tms_stime;	/* system time for this process */
-	clock_t	tms_cutime;	/* children's user time */
-	clock_t	tms_cstime;	/* children's system time */
-};
-.fi
-.RE
-.PP
-The user time is the number of clock ticks used by a process on
-its own computations.  The system time is the number of clock ticks
-spent inside the kernel on behalf of a process.  This does not
-include time spent waiting for I/O to happen, only actual CPU
-instruction times.
-.PP
-The children times are the sum
-of the children's process times and
-their children's times.
-.SH RETURN
-.B Times
-returns 0 on success, otherwise \-1 with the error code stored into the
-global variable
-.BR errno .
-.SH ERRORS
-The following error code may be set in
-.BR errno :
-.TP 15
-[EFAULT]
-The address specified by the
-.I buffer
-parameter is not in a valid part of the process address space.
-.SH "SEE ALSO"
-.BR time (1),
-.BR wait (2),
-.BR time (2).
Index: trunk/minix/man/man2/truncate.2
===================================================================
--- trunk/minix/man/man2/truncate.2	(revision 9)
+++ 	(revision )
@@ -1,30 +1,0 @@
-.TH TRUNCATE 2 "Feb 13, 2006"
-.UC 4
-.SH NAME
-truncate, ftruncate \- truncate a file to a specified length (may extend)
-.SH SYNOPSIS
-.ft B
-.nf
-#include <unistd.h>
-
-int truncate(char *filename, off_t length);
-int ftruncate(int fd, off_t length);
-.fi
-.ft R
-.SH DESCRIPTION
-.B Truncate
-causes the file 
-.B filename
-to be set to the length
-.B length
-causing data after that size to be lost. If the file is set to a 
-length larger than the current file size, the new region can be
-written to but reads as zeroes. There will be no disk blocks reserved
-for it. This is a hole.
-.PP
-.B Ftruncate
-does the same thing as 
-.B truncate
-but operates on a file descriptor instead of a filename.
-.SH "SEE ALSO
-.BR fcntl (2)
Index: trunk/minix/man/man2/umask.2
===================================================================
--- trunk/minix/man/man2/umask.2	(revision 9)
+++ 	(revision )
@@ -1,38 +1,0 @@
-.\" Copyright (c) 1980 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)umask.2	6.1 (Berkeley) 5/9/85
-.\"
-.TH UMASK 2 "May 9, 1985"
-.UC 4
-.SH NAME
-umask \- set file creation mode mask
-.SH SYNOPSIS
-.nf
-.ft B
-#include <sys/types.h>
-#include <sys/stat.h>
-
-mode_t umask(mode_t \fImask\fP)
-.ft R
-.fi
-.SH DESCRIPTION
-.B Umask
-sets the process's file mode creation mask to \fImask\fP
-and returns the previous value of the mask.  The low-order
-9 bits of \fImask\fP are used whenever a file is created,
-clearing corresponding bits in the file mode
-(see
-.BR chmod (2)).
-This clearing allows each user to restrict the default access
-to his files.
-.PP
-The value is initially 022 (write access for owner only).
-The mask is inherited by child processes.
-.SH "RETURN VALUE
-The previous value of the file mode mask is returned by the call.
-.SH SEE ALSO
-.BR chmod (2),
-.BR mknod (2),
-.BR open (2).
Index: trunk/minix/man/man2/uname.2
===================================================================
--- trunk/minix/man/man2/uname.2	(revision 9)
+++ 	(revision )
@@ -1,35 +1,0 @@
-.TH UNAME 2
-.SH NAME
-uname \- get system info
-.SH SYNOPSIS
-.ft B
-.nf
-#include <sys/utsname.h>
-
-int uname(struct utsname *name)
-.fi
-.ft P
-.SH DESCRIPTION
-.B Uname()
-fills a struct utsname with system information.  This structure is described
-in <sys/utsname.h> as follows:
-.PP
-.nf
-.ta +4n +6n +25n
-struct utsname {
-	char	sysname[15+1];		/* System name */
-	char	nodename[255+1];	/* Node/Network name */
-	char	release[11+1];		/* O.S. release */
-	char	version[7+1];		/* O.S. version */
-	char	machine[11+1];		/* Machine hardware */
-	char	arch[11+1];		/* Architecture */
-};
-.fi
-.PP
-The strings are always null terminated, and may be of a different length then
-shown here.  The first five are required by \s-2POSIX\s+2, the last is
-MINIX 3 specific.
-.SH "SEE ALSO"
-.BR uname (1).
-.SH AUTHOR
-Kees J. Bot (kjb@cs.vu.nl)
Index: trunk/minix/man/man2/unlink.2
===================================================================
--- trunk/minix/man/man2/unlink.2	(revision 9)
+++ 	(revision )
@@ -1,84 +1,0 @@
-.\" Copyright (c) 1980 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)unlink.2	6.2 (Berkeley) 5/22/85
-.\"
-.TH UNLINK 2 "May 22, 1985"
-.UC 4
-.SH NAME
-unlink \- remove directory entry
-.SH SYNOPSIS
-.nf
-.ft B
-#include <unistd.h>
-
-int unlink(const char *path)
-.fi
-.ft R
-.SH DESCRIPTION
-.B Unlink
-removes the entry for the file
-.I path
-from its directory.
-If this entry was the last link to the file,
-and no process has the file open, then
-all resources associated with the file are reclaimed.
-If, however, the file was open in any process, the actual
-resource reclamation is delayed until it is closed,
-even though the directory entry has disappeared.
-.SH "RETURN VALUE
-Upon successful completion, a value of 0 is returned.
-Otherwise, a value of \-1 is returned and
-.B errno
-is set to indicate the error.
-.SH "ERRORS
-The \fIunlink\fP succeeds unless:
-.TP 15
-[ENOTDIR]
-A component of the path prefix is not a directory.
-.TP 15
-[ENAMETOOLONG]
-The path name exceeds PATH_MAX characters.
-.TP 15
-[ENOENT]
-The named file does not exist.
-.TP 15
-[EACCES]
-Search permission is denied for a component of the path prefix.
-.TP 15
-[EACCES]
-Write permission is denied on the directory containing the link
-to be removed.
-.TP 15
-[ELOOP]
-Too many symbolic links were encountered in translating the pathname.
-(Minix-vmd)
-.TP 15
-[EPERM]
-The named file is a directory.
-.TP 15
-[EPERM]
-The directory containing the file is marked sticky,
-and neither the containing directory nor the file to be removed
-are owned by the effective user ID.
-(Minix-vmd)
-.TP 15
-[EBUSY]
-The entry to be unlinked is the mount point for a
-mounted file system.
-.TP 15
-[EIO]
-An I/O error occurred while deleting the directory entry
-or deallocating the inode.
-.TP 15
-[EROFS]
-The named file resides on a read-only file system.
-.TP 15
-[EFAULT]
-.I Path
-points outside the process's allocated address space.
-.SH "SEE ALSO"
-.BR close (2),
-.BR link (2),
-.BR rmdir (2).
Index: trunk/minix/man/man2/utime.2
===================================================================
--- trunk/minix/man/man2/utime.2	(revision 9)
+++ 	(revision )
@@ -1,85 +1,0 @@
-.\" Copyright (c) 1980 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)utimes.2	6.4 (Berkeley) 8/26/85
-.\"
-.TH UTIME 2 "August 26, 1985"
-.UC 4
-.SH NAME
-utime \- set file times
-.SH SYNOPSIS
-.nf
-.ft B
-#include <sys/types.h>
-#include <utime.h>
-
-int utime(const char *\fIfile\fP, struct utimbuf *\fItimes\fP)
-.fi
-.SH DESCRIPTION
-The
-.B utime
-call
-uses the
-\*(lqaccessed\*(rq and \*(lqupdated\*(rq times
-from the utimbuf structure pointed to by
-.I times
-to set the corresponding recorded times for
-.I file.
-.PP
-Struct utimbuf is defined in <utime.h> as follows:
-.PP
-.RS
-.nf
-.ta +0.4i +0.8i +1.0i
-struct utimbuf {
-	time_t	actime;	/* access time */
-	time_t	modtime;	/* modification time */
-};
-.fi
-.RE
-.PP
-The caller must be the owner of the file or the super-user.
-The \*(lqinode-changed\*(rq time of the file is set to the current time.
-.SH "RETURN VALUE
-Upon successful completion, a value of 0 is returned.
-Otherwise, a value of \-1 is returned and
-.B errno
-is set to indicate the error.
-.SH "ERRORS
-.B Utime
-will fail if one or more of the following are true:
-.TP 15
-[ENOTDIR]
-A component of the path prefix is not a directory.
-.TP 15
-[EINVAL]
-The pathname contains a character with the high-order bit set.
-.TP 15
-[ENAMETOOLONG]
-The path name exceeds PATH_MAX characters.
-.TP 15
-[ENOENT]
-The named file does not exist.
-.TP 15
-[ELOOP]
-Too many symbolic links were encountered in translating the pathname.
-(Minix-vmd)
-.TP 15
-[EPERM]
-The process is not super-user and not the owner of the file.
-.TP 15
-[EACCES]
-Search permission is denied for a component of the path prefix.
-.TP 15
-[EROFS]
-The file system containing the file is mounted read-only.
-.TP 15
-[EFAULT]
-.I File
-or \fItimes\fP points outside the process's allocated address space.
-.TP 15
-[EIO]
-An I/O error occurred while reading or writing the affected inode.
-.SH SEE ALSO
-.BR stat (2).
Index: trunk/minix/man/man2/wait.2
===================================================================
--- trunk/minix/man/man2/wait.2	(revision 9)
+++ 	(revision )
@@ -1,162 +1,0 @@
-.\" Copyright (c) 1980 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)wait.2	6.2 (Berkeley) 6/30/85
-.\"
-.TH WAIT 2 "June 30, 1985"
-.UC 4
-.SH NAME
-wait, waitpid \- wait for process to terminate
-.SH SYNOPSIS
-.ft B
-.nf
-#include <sys/types.h>
-#include <sys/wait.h>
-
-pid_t wait(int *\fIstatus\fP)
-pid_t waitpid(pid_t \fIpid\fP, int *\fIstatus\fP, int \fIoptions\fP)
-.fi
-.SH DESCRIPTION
-.B Wait
-causes its caller to delay until a signal is received or
-one of its child
-processes terminates.
-If any child has died since the last
-.BR wait ,
-return is immediate, returning the process id and
-exit status of one of the terminated
-children.
-If there are no children, return is immediate with
-the value \-1 returned.
-.PP
-On return from a successful 
-.B wait
-call, 
-.I status
-is nonzero, and the high byte of 
-.I status
-contains the low byte of the argument to
-.B exit
-supplied by the child process;
-the low byte of 
-.I status
-contains the termination status of the process.
-A more precise definition of the
-.I status
-word is given in
-.RI < sys/wait.h >.
-.B Wait
-can be called with a null pointer argument to indicate that no status need
-be returned.
-.PP
-.B Waitpid
-provides an alternate interface for programs
-that must not block when collecting the status
-of child processes, or that wish to wait for
-one particular child.  The pid parameter is
-the process ID of the child to wait for, \-1
-for any child.  The
-.I status
-parameter is defined as above.  The
-.I options
-parameter is used to indicate the call should not block if
-there are no processes that wish to report status (WNOHANG),
-and/or that children of the current process that are stopped
-due to a SIGTTIN, SIGTTOU, SIGTSTP, or SIGSTOP signal should also have
-their status reported (WUNTRACED).  (Job control is not implemented for
-MINIX 3, but these symbols and signals are.)
-.PP
-When the WNOHANG option is specified and no processes
-wish to report status, 
-.B waitpid
-either returns 0 under some implementations, or \-1 with
-.B errno
-set to
-.B EAGAIN
-under others.
-(Under MINIX 3 it returns 0.)
-The WNOHANG and WUNTRACED options may be combined by 
-.IR or 'ing
-the two values.
-.SH NOTES
-The call
-.BI "wait(&" status ")"
-is equivalent to
-.BI "waitpid(\-1, &" status ", 0)\fR."
-.PP
-See
-.BR sigaction (2)
-for a list of termination statuses (signals);
-0 status indicates normal termination.
-A special status (0177) is returned for a stopped process
-that has not terminated and can be restarted;
-see
-.BR ptrace (2).
-If the 0200 bit of the termination status
-is set,
-a core image of the process was produced
-by the system.
-.PP
-If the parent process terminates without
-waiting on its children,
-the initialization process
-(process ID = 1)
-inherits the children.
-.PP
-.I <sys/wait.h>
-defines a number of macros that operate on a status word:
-.TP 5
-.BI "WIFEXITED(" status ")"
-True if normal exit.
-.TP 5
-.BI "WEXITSTATUS(" status ")"
-Exit status if the process returned by a normal exit, zero otherwise.
-.TP 5
-.BI "WTERMSIG(" status ")"
-Signal number if the process died by a signal, zero otherwise.
-.TP 5
-.BI "WIFSIGNALED(" status ")"
-True if the process died by a signal.
-.TP 5
-.BI "WIFSTOPPED(" status ")"
-True if the process is stopped.  (Never true under MINIX 3.)
-.TP 5
-.BI "WSTOPSIG(" status ")"
-Signal number of the signal that stopped the process.
-.SH "RETURN VALUE
-If \fBwait\fP returns due to a stopped
-or terminated child process, the process ID of the child
-is returned to the calling process.  Otherwise, a value of \-1
-is returned and \fBerrno\fP is set to indicate the error.
-.PP
-.B Waitpid
-returns \-1 if there are no children not previously waited for or if
-the process that it wants to wait for doesn't exist.
-.PP
-.B Waitpid
-returns 0 if WNOHANG is specified and there are no stopped or exited
-children.  (Under other implementations it may return \-1 instead.  Portable
-code should test for both possibilities.)
-.SH ERRORS
-.B Wait
-will fail and return immediately if one or more of the following
-are true:
-.TP 15
-[ECHILD]
-The calling process has no existing unwaited-for
-child processes.
-.TP 15
-[EFAULT]
-The \fIstatus\fP argument points to an illegal address.
-.TP 15
-[EAGAIN]
-.B Waitpid
-is called with the WNOHANG option and no child has exited yet.  (Not under
-MINIX 3, it'll return 0 in this case and leave
-.B errno
-alone.)
-.SH "SEE ALSO"
-.BR execve (2),
-.BR exit (2),
-.BR sigaction (2).
Index: trunk/minix/man/man2/write.2
===================================================================
--- trunk/minix/man/man2/write.2	(revision 9)
+++ 	(revision )
@@ -1,97 +1,0 @@
-.\" Copyright (c) 1980 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)write.2	6.5 (Berkeley) 5/14/86
-.\"
-.TH WRITE 2 "May 14, 1986"
-.UC 4
-.SH NAME
-write \- write output
-.SH SYNOPSIS
-.nf
-.ft B
-#include <sys/types.h>
-#include <unistd.h>
-
-ssize_t write(int \fId\fP, const void *\fIbuf\fP, size_t \fInbytes\fP)
-.fi
-.SH DESCRIPTION
-.B Write
-attempts to write
-.I nbytes
-of data to the object referenced by the descriptor
-.I d
-from the buffer pointed to by
-.IR buf .
-.PP
-On objects capable of seeking, the \fBwrite\fP starts at a position
-given by the pointer associated with
-.IR d ,
-see
-.BR lseek (2).
-Upon return from
-.BR write ,
-the pointer is incremented by the number of bytes actually written.
-.PP
-Objects that are not capable of seeking always write from the current
-position.  The value of the pointer associated with such an object
-is undefined.
-.PP
-When using non-blocking I/O on objects such as TCP/IP channels that are
-subject to flow control,
-.B write
-may write fewer bytes than requested;
-the return value must be noted,
-and the remainder of the operation should be retried when possible.
-.SH "RETURN VALUE
-Upon successful completion the number of bytes actually written
-is returned.  Otherwise a \-1 is returned and the global variable
-.B errno
-is set to indicate the error.
-.SH ERRORS
-.B Write
-will fail and the file pointer will remain unchanged if one or more
-of the following are true:
-.TP 15
-[EBADF]
-\fID\fP is not a valid descriptor open for writing.
-.TP 15
-[EPIPE]
-An attempt is made to write to a pipe that is not open
-for reading by any process.
-.TP 15
-[EPIPE]
-An attempt is made to write to a TCP channel
-that is not connected to a peer socket.
-.TP 15
-[EFBIG]
-An attempt was made to write a file that exceeds the process's
-file size limit or the maximum file size.
-.TP 15
-[EFAULT]
-Part of the data to be written to the file
-points outside the process's allocated address space.
-.TP 15
-[ENOSPC]
-There is no free space remaining on the file system
-containing the file.
-.ig
-.TP 15
-[EDQUOT]
-The user's quota of disk blocks on the file system
-containing the file has been exhausted.
-..
-.TP 15
-[EIO]
-An I/O error occurred while reading from or writing to the file system.
-.TP 15
-[EAGAIN]
-The file was marked for non-blocking I/O,
-and no data could be written immediately.
-.SH "SEE ALSO"
-.BR fcntl (2),
-.BR lseek (2),
-.BR open (2),
-.BR pipe (2),
-.BR read (2).
