Gitiles
Code Review
Sign In
gerrit-public.fairphone.software
/
platform
/
external
/
musl
/
df4b017bcdf626a1ef8bbd8e9724d336c788fb0d
/
.
/
src
/
unistd
/
tcgetpgrp.c
blob: 50080c7e8e791e2b44174c5c166850a00be8af2f [
file
] [
log
] [
blame
]
#include
<unistd.h>
#include
<termios.h>
#include
<sys/ioctl.h>
pid_t
tcgetpgrp
(
int
fd
)
{
int
pgrp
;
if
(
ioctl
(
fd
,
TIOCGPGRP
,
&
pgrp
)
<
0
)
return
-
1
;
return
pgrp
;
}