Idris2Doc : System.Posix.Process.Prim

System.Posix.Process.Prim

(source)

Reexports

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

Definitions

getpid : PrimIOPidT
getppid : PrimIOPidT
getuid : PrimIOUidT
geteuid : PrimIOUidT
getgid : PrimIOGidT
getegid : PrimIOGidT
setuid : UidT->EPrim ()
  Tries to set the real user ID of the current process

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

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

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

Totality: total
Visibility: export
fork : EPrimPidT
  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 : String->CArrayIOm (MaybeString) ->CArrayIOn (MaybeString) ->EPrim ()
  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 : String->ListString->List (String, String) ->EPrim ()
  Convenience alias of `execve` that uses Idris lists for passing
the arguments list and environment.

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

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

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

Totality: total
Visibility: export
system : String->EPrimProcStatus
  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_ : IOBoxCInt->EPrimPidT
  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. In addition, the termination status of the child
is written into the given pointer.

Totality: total
Visibility: export
waitpid_ : PidT->IOBoxCInt->WaitFlags->EPrimPidT
  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_ : IdType->PidT->SiginfoT->WaitFlags->EPrim ()
  More powerful version of `waitpid` supporting additional flags and
waiting on groups of children. Wait results are stored in the
provided `SiginfoT` pointer.

Totality: total
Visibility: export
wait : EPrim (PidT, ProcStatus)
  Convenience version of `wait_`.

Totality: total
Visibility: export
waitpid : PidT->WaitFlags->EPrim (PidT, ProcStatus)
  Convenience version of `waitpid_`.

Totality: total
Visibility: export
waitid : IdType->PidT->WaitFlags->EPrimSiginfo
  Convenience version of `waitid_`.

Totality: total
Visibility: export