
/* Additional POSIX functions. */

/* Copyright (c) 2009-2012 by Albert Graef <Dr.Graef@t-online.de>.

   This file is part of the Pure standard library.

   The Pure standard library is free software: you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public License as
   published by the Free Software Foundation, either version 3 of the License,
   or (at your option) any later version.

   Pure is distributed in the hope that it will be useful, but WITHOUT ANY
   WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
   FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for
   more details.

   You should have received a copy of the GNU Lesser General Public License
   along with this program.  If not, see <http://www.gnu.org/licenses/>. */

/* ..

   Additional POSIX Functions
   --------------------------

   .. module:: posix
      :platform: Mac, Unix

   The posix module provides some additional POSIX functions not available on
   all supported systems. (In particular, none of these functions are provided
   on MS Windows.) You can load this module in addition to the system module
   if you need the additional functionality. To use the operations of this
   module, add the following import declaration to your program::

     using posix;

   The following operations are provided. Please see the appropriate POSIX
   manual pages for a closer description of these functions.

   .. function:: fork

      Fork a new process.

   .. function:: getpid
                 getppid

      Get the process id of the current process and its parent process,
      respectively.

   .. function:: wait status
                 waitpid pid status options

      Wait for any child process, or the given one. The ``status`` argument
      must be a pointer to an ``int`` value, which is used to return the
      status of the child process.

   .. function:: kill pid sig

      Send the given signal to the given process.

   .. function:: raise sig

      Raise the given signal in the current process.

   .. function:: pause

      Sleep until a signal is caught.

 */

extern int fork();

extern int getpid();
extern int getppid();

extern int wait(int *status);
extern int waitpid(int pid, int *status, int options);

extern int kill(int pid, int sig);
extern int raise(int sig);
extern int pause();
