Function tcsetpgrp [src]
Sets the controlling process group ID for given TTY.
handle must be valid fd_t to a TTY associated with calling process.
pgrp must be a valid process group, and the calling process must be a member
of that group.
  Prototype
 pub fn tcsetpgrp(handle: fd_t, pgrp: pid_t) TermioSetPgrpError!void  Parameters
handle: fd_tpgrp: pid_t Possible Errors
The Operating System returned an undocumented error code.
This error is in theory not possible, but it would be better to handle this error than to invoke undefined behavior.
When this error code is observed, it usually means the Zig Standard Library needs a small patch to add the error code to the error set for the respective function.
Source
 pub fn tcsetpgrp(handle: fd_t, pgrp: pid_t) TermioSetPgrpError!void {
    while (true) {
        switch (errno(system.tcsetpgrp(handle, &pgrp))) {
            .SUCCESS => return,
            .BADF => unreachable,
            .INVAL => unreachable,
            .INTR => continue,
            .NOTTY => return error.NotATerminal,
            .PERM => return TermioSetPgrpError.NotAPgrpMember,
            else => |err| return unexpectedErrno(err),
        }
    }
}