getpgid01: On Android, pgid(1) is 0 instead of 1
PATCH v2 1/1 getpgid01: On Android, pgid(1) is 0 instead of 1
From: Edward Liaw via ltp <[email protected]>
Android's init does not call setpgid(0, 0) so it does not have pgid=1. 0 is functionally equivalent, since pgid 0 means the pgid is the same as the process pid.
Signed-off-by Edward Liaw <[email protected]>
--- testcases/kernel/syscalls/getpgid/getpgid01.c | 4 ++++ 1 file changed, 4 insertions(+)
testcases/kernel/syscalls/getpgid/getpgid01.c +4 -0
@@ -37,7 +37,11 @@ static void run(void)TST_EXP_EQ_LI (TST_RET , pgid);TST_EXP_PID (getpgid (1 )); +#ifndef __ANDROID__TST_EXP_EQ_LI (TST_RET ,1 ); +#else +TST_EXP_EQ_LI (TST_RET ,0 ); +#endif }tst_reap_children ();
Signature · 5 lines
2.42.0.582.g8ccd20d70d-goog -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Edward,
Reviewed-by Petr Vorel <[email protected]>
Kind regards,
Petr
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp