diff options
Diffstat (limited to 'libc-top-half/musl/src/unistd/tcgetpgrp.c')
-rw-r--r-- | libc-top-half/musl/src/unistd/tcgetpgrp.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/unistd/tcgetpgrp.c b/libc-top-half/musl/src/unistd/tcgetpgrp.c new file mode 100644 index 0000000..50080c7 --- /dev/null +++ b/libc-top-half/musl/src/unistd/tcgetpgrp.c @@ -0,0 +1,11 @@ +#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; +} |