summaryrefslogtreecommitdiffstats
path: root/libc-top-half/musl/src/termios/tcgetsid.c
blob: 1053fd64724790adce5644375a7a1cec6e97df96 (plain)
1
2
3
4
5
6
7
8
9
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;
}