Mono Class Library: Mono.Unix.UnixEnvironment Overview | Members

Mono.Unix.UnixEnvironment.CreateSession Method

Create a new session.

public static int CreateSession ()

See Also

Mono.Unix.Native.Syscall.setsid

Returns

A int containing the return value of the Mono.Unix.Native.Syscall.setsid call. This can be ignored, since it will be translated into an exception if it's an error anyway.

Exceptions

TypeReason
InvalidOperationException The calling process is already a process group leader, or the process group ID of a process other than the calling process matches the process ID of the calling process. [Mono.Unix.Native.Errno.EPERM]

Remarks

This method creates a new session. The calling process is the session leader of the new session, is the process group leader of a new process group and has no controlling terminal. The calling process is the only process in either the session or the process group.

Requirements

Namespace: Mono.Unix
Assembly: Mono.Posix (in Mono.Posix.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0