]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
tools/nolibc: add setpgrp()
authorThomas Weißschuh <thomas.weissschuh@linutronix.de>
Fri, 11 Apr 2025 09:00:44 +0000 (11:00 +0200)
committerThomas Weißschuh <linux@weissschuh.net>
Tue, 22 Apr 2025 08:56:27 +0000 (10:56 +0200)
setpgrp() is defined to be identical to setpgid(0, 0).

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Acked-by: Willy Tarreau <w@1wt.eu>
tools/include/nolibc/sys.h

index 6fe2882370206ed3e6ac2107c1ba72e4f1705ab8..bc47007f04429e5b1ff7d57f21e566fa235f6512 100644 (file)
@@ -952,6 +952,16 @@ int setpgid(pid_t pid, pid_t pgid)
        return __sysret(sys_setpgid(pid, pgid));
 }
 
+/*
+ * pid_t setpgrp(void)
+ */
+
+static __attribute__((unused))
+pid_t setpgrp(void)
+{
+       return setpgid(0, 0);
+}
+
 
 /*
  * pid_t setsid(void);