Idris2Doc : System.Posix.Process

System.Posix.Process

(source)

Reexports

importpublic Data.C.Ptr
importpublic System.Posix.Errno
importpublic System.Posix.Process.Flags
importpublic System.Posix.Process.ProcStatus

Definitions

getpid : HasIOio=>ioPidT
  Returns the process ID of the current process

Totality: total
Visibility: export
getppid : HasIOio=>ioPidT
  Returns the process ID of the current process' parent process

Totality: total
Visibility: export
getuid : HasIOio=>ioUidT
  Returns the real user ID of the current process

Totality: total
Visibility: export
geteuid : HasIOio=>ioUidT
  Returns the effective user ID of the current process

Totality: total
Visibility: export
getgid : HasIOio=>ioGidT
  Returns the real group ID of the current process

Totality: total
Visibility: export
getegid : HasIOio=>ioGidT
  Returns the effective group ID of the current process

Totality: total
Visibility: export
setuid : HasErrnoes=>EIO1f=>UidT->fes ()
  Tries to set the real user ID of the current process

Totality: total
Visibility: export
seteuid : HasErrnoes=>EIO1f=>UidT->fes ()
  Tries to set the effective user ID of the current process

Totality: total
Visibility: export
setgid : HasErrnoes=>EIO1f=>GidT->fes ()
  Tries to set the real group ID of the current process

Totality: total
Visibility: export
setegid : HasErrnoes=>EIO1f=>GidT->fes ()
  Tries to set the effective group ID of the current process

Totality: total
Visibility: export
fork : HasErrnoes=>EIO1f=>fesPidT
  Creates a new child process.

This creates a new process by copying the stack, head, and
data memory segment of the parent process. If successful,
the functions returns `0` for the child process and
the child's process ID for the parent.

Totality: total
Visibility: export
execve : HasErrnoes=>EIO1f=>String->CArrayIOm (MaybeString) ->CArrayIOn (MaybeString) ->fes ()
  Loads a new program into this process's memory.

`path` : The path of the program to run
`args` : Command-line arguments (a `NULL` terminated array of strings)
`env ` : Environment (a `NULL` terminated array of strings of the for "a=b")

This only returns in case of an error.

Totality: total
Visibility: export
execle : HasErrnoes=>EIO1f=>String->ListString->List (String, String) ->fes ()
  Convenience alias of `execve` that uses Idris lists for passing
the arguments list and environment.

Totality: total
Visibility: export
execv : HasErrnoes=>EIO1f=>String->CArrayIOm (MaybeString) ->fes ()
  Like `execve` but uses the environment of the current process.

Totality: total
Visibility: export
execvp : HasErrnoes=>EIO1f=>String->CArrayIOm (MaybeString) ->fes ()
  Like `execv` but allows us to just use a filename
and resolve in using the `$PATH` variable.

Totality: total
Visibility: export
execlp : HasErrnoes=>EIO1f=>String->ListString->fes ()
  Convenience alias for `execvp` that uses an Idris list for
the list of arguments.

Totality: total
Visibility: export
system : HasErrnoes=>EIO1f=>String->fesProcStatus
  Runs the given shell command in a child process.

This has a slightly different type signature that the actual
`system` call in C, which allows us to use the same mechanism
as with `wait` to get the returned exit status.

Totality: total
Visibility: export
wait : HasErrnoes=>EIO1f=>fes (PidT, ProcStatus)
  Waits for one of the child processes of this process to
terminate.

On success, this returns the process ID of the child process
that terminated plus its termination status.

Totality: total
Visibility: export
waitpid : HasErrnoes=>EIO1f=>PidT->WaitFlags->fes (PidT, ProcStatus)
  Waits for the given child processes of to terminate.

Unlike `wait`, this allows us to wait on a specific child process.
In addition, it is possible to be notified about child processes that have
been terminated by a signal.

Totality: total
Visibility: export
waitid : HasErrnoes=>EIO1f=>IdType->PidT->WaitFlags->fesSiginfo
  More powerful version of `waitpid` supporting additional flags and
waiting on groups of children. Wait results are stored in a `Siginfo`
record.

Totality: total
Visibility: export