Gitiles
Code Review
Sign In
gerrit-public.fairphone.software
/
platform
/
external
/
musl
/
9ef6ca4235b7a66aefa432295c02b4df64a53f2e
/
.
/
src
/
termios
/
tcgetsid.c
blob: 1053fd64724790adce5644375a7a1cec6e97df96 [
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
;
}