Sign in
mojo
/
mojo-tools
/
7d579155cc597aa3befcbfad66eef54bda06b57c
/
.
/
fusl
/
src
/
termios
/
tcgetsid.c
blob: e558f32453b6418c9a79309612a2b3374d2babde [
file
] [
log
] [
blame
]
#include
<termios.h>
#include
<sys/ioctl.h>
pid_t
tcgetsid
(
int
fd
)
{
int
sid
;
if
(
ioctl
(
fd
,
TIOCGSID
,
&
sid
)
<
0
)
return
-
1
;
return
sid
;
}