summaryrefslogtreecommitdiff
path: root/src/termios/tcgetsid.c
blob: aa6c44de792b9a6b2f31ab4bfea2e016291380b8 (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)
*/