Node:Terminals and Ptys, Next:, Previous:Signals, Up:POSIX

38.9 Terminals and Ptys

isatty? port Scheme Procedure
scm_isatty_p (port) C Function
Return #t if port is using a serial non-file device, otherwise #f.

ttyname port Scheme Procedure
scm_ttyname (port) C Function
Return a string with the name of the serial terminal device underlying port.

ctermid Scheme Procedure
scm_ctermid () C Function
Return a string containing the file name of the controlling terminal for the current process.

tcgetpgrp port Scheme Procedure
scm_tcgetpgrp (port) C Function
Return the process group ID of the foreground process group associated with the terminal open on the file descriptor underlying port.

If there is no foreground process group, the return value is a number greater than 1 that does not match the process group ID of any existing process group. This can happen if all of the processes in the job that was formerly the foreground job have terminated, and no other job has yet been moved into the foreground.

tcsetpgrp port pgid Scheme Procedure
scm_tcsetpgrp (port, pgid) C Function
Set the foreground process group ID for the terminal used by the file descriptor underlying port to the integer pgid. The calling process must be a member of the same session as pgid and must have the same controlling terminal. The return value is unspecified.