summaryrefslogtreecommitdiff
path: root/src/termios/tcgetsid.c
blob: 4a202233baf59a4746b836b680420beb82351943 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <sys/types.h>
#include <termios.h>

pid_t tcgetsid(int fildes)
{
	pid_t pid = -1;
	if (ioctl(fildes, TIOCGSID, &pid) == -1) {
		return (pid_t)-1;
	}
	return pid;
}

/*
XOPEN(400)
POSIX(200809)
*/