From f8170e41fe131d129edab0370716adf666f67cea Mon Sep 17 00:00:00 2001 From: ed Date: Thu, 7 May 2009 13:49:48 +0000 Subject: Add tcsetsid(3). The entire world seems to use the non-standard TIOCSCTTY ioctl to make a TTY a controlling terminal of a session. Even though tcsetsid(3) is also non-standard, I think it's a lot better to use in our own source code, mainly because it's similar to tcsetpgrp(), tcgetpgrp() and tcgetsid(). I stole the idea from QNX. They do it the other way around; their TIOCSCTTY is just a wrapper around tcsetsid(). tcsetsid() then calls into an IPC framework. --- sys/sys/termios.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys/sys/termios.h') diff --git a/sys/sys/termios.h b/sys/sys/termios.h index 192c3f2..0543d6e 100644 --- a/sys/sys/termios.h +++ b/sys/sys/termios.h @@ -272,8 +272,9 @@ int tcsendbreak(int, int); #if __POSIX_VISIBLE >= 200112 || __BSD_VISIBLE pid_t tcgetsid(int); #endif - #if __BSD_VISIBLE +int tcsetsid(int, pid_t); + void cfmakeraw(struct termios *); int cfsetspeed(struct termios *, speed_t); #endif -- cgit v1.1