pgid.ha (397B)
1 // SPDX-License-Identifier: MPL-2.0 2 // (c) Hare authors <https://harelang.org> 3 4 use errors; 5 use io; 6 use os::exec; 7 use rt; 8 9 // Sets the process group on the foreground of this terminal. 10 export fn tcsetpgrp(fd: io::file, pg: exec::process) (void | errors::error) = { 11 match (rt::ioctl(fd, rt::TIOCSPGRP, pg: u64)) { 12 case int => void; 13 case let err: rt::errno => 14 return errors::errno(err); 15 }; 16 };