diff options
Diffstat (limited to 'libc-top-half/musl/src/termios/tcgetsid.c')
-rw-r--r-- | libc-top-half/musl/src/termios/tcgetsid.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/termios/tcgetsid.c b/libc-top-half/musl/src/termios/tcgetsid.c new file mode 100644 index 0000000..1053fd6 --- /dev/null +++ b/libc-top-half/musl/src/termios/tcgetsid.c @@ -0,0 +1,10 @@ +#include <termios.h> +#include <sys/ioctl.h> + +pid_t tcgetsid(int fd) +{ + int sid; + if (ioctl(fd, TIOCGSID, &sid) < 0) + return -1; + return sid; +} |