blob: 14912c376125a5164710caf8b5d2c1e231e9c085 [file] [log] [blame]
yuezonghe824eb0c2024-06-27 02:32:26 -07001/* vi: set sw=4 ts=4: */
2/*
3 * getpgrp() for uClibc
4 *
5 * Copyright (C) 2000-2008 by Erik Andersen <andersen@codepoet.org>
6 *
7 * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
8 */
9
10#include <sys/syscall.h>
11#include <unistd.h>
12
13#ifdef __NR_getpgrp
14/* According to the manpage the POSIX.1 version is favoured */
15_syscall_noerr0(pid_t, getpgrp)
16#elif defined __NR_getpgid
17pid_t getpgrp(void)
18{
19 return getpgid(0);
20}
21#endif