diff options
Diffstat (limited to 'lib/libc/gen/termios.c')
-rw-r--r-- | lib/libc/gen/termios.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/libc/gen/termios.c b/lib/libc/gen/termios.c index 333dff4..4c6dcff 100644 --- a/lib/libc/gen/termios.c +++ b/lib/libc/gen/termios.c @@ -99,6 +99,17 @@ tcgetpgrp(fd) return ((pid_t)s); } +pid_t +tcgetsid(int fd) +{ + int s; + + if (_ioctl(fd, TIOCGSID, &s) < 0) + return ((pid_t)-1); + + return ((pid_t)s); +} + speed_t cfgetospeed(t) const struct termios *t; |