// Flow suspends or resumes the transmission or reception of data on // the terminal associated with fd, depending on the value of the act // argument. The act argument value must be one of: TCOOFF (suspend // transmission), TCOON (resume transmission), TCIOFF (suspend // reception by sending a STOP char), TCION (resume reception by // sending a START char). See also tcflow(3). func Flow(fd int, act int) error { for { r, err := C.tcflow(C.int(fd), C.int(act)) if r < 0 { // This is most-likely not possible, but // better be safe. if err == syscall.EINTR { continue } return err } return nil } }
// Flow suspends transmission of data to, or the reception of data from, // the terminal referenced by fd, depending on the value of action. func Flow(fd uintptr, action int) error { //int tcflow(int, int); _, rv := C.tcflow(C.int(fd), C.int(action)) return rv }