Skip to contentSkip to conversation

setpgid02: use 1 instead of getpgid(1)

PATCH Superseded Edward Liaw via ltp 1 participant 1 message Mar 30, 2023

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 setpgid02: use 1 instead of getpgid(1)

On Android, init does not setpgid, so getpgid(1) returns 0 and the third case of setting pgid to a different session's process group does not behave as expected. Replace it with the expected value.

---
 testcases/kernel/syscalls/setpgid/setpgid02.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/kernel/syscalls/setpgid/setpgid02.c +1 -1
index 4b63afee8..bf7b3176b 100644
@@ -44,7 +44,7 @@ static void setup(void)
 	 * Getting pgid of init/systemd process to use it as a
 	 * process group from a different session for EPERM test
 	 */
-	init_pgid = SAFE_GETPGID(1);
+	init_pgid = 1;
 }
 
 static void run(unsigned int n)
Signature · 5 lines
2.40.0.348.gf938b09366-goog


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp