Lines Matching refs:ps
318 static __attribute__((unused)) void GetChildStat(posix_spawnattr_t* sa, ProcStat* ps) { in GetChildStat() argument
322 ASSERT_EQ(4, sscanf(content.c_str(), "%d (cat) %*c %d %d %d", &ps->pid, &ps->ppid, &ps->pgrp, in GetChildStat()
323 &ps->sid)); in GetChildStat()
325 ASSERT_EQ(getpid(), ps->ppid); in GetChildStat()
333 static void __attribute__((unused)) GetChildStatus(posix_spawnattr_t* sa, ProcStatus* ps) { in GetChildStatus() argument
340 if (sscanf(line.c_str(), "SigBlk: %" SCNx64, &ps->sigblk) == 1) saw_blk = true; in GetChildStatus()
341 if (sscanf(line.c_str(), "SigIgn: %" SCNx64, &ps->sigign) == 1) saw_ign = true; in GetChildStatus()
354 ProcStat ps = {}; in TEST() local
355 GetChildStat(&sa, &ps); in TEST()
356 ASSERT_EQ(parent_sid, ps.sid); in TEST()
367 ProcStat ps = {}; in TEST() local
368 GetChildStat(&sa, &ps); in TEST()
369 ASSERT_NE(parent_sid, ps.sid); in TEST()
380 ProcStat ps = {}; in TEST() local
381 GetChildStat(&sa, &ps); in TEST()
382 ASSERT_EQ(parent_pgrp, ps.pgrp); in TEST()
394 ProcStat ps = {}; in TEST() local
395 GetChildStat(&sa, &ps); in TEST()
396 ASSERT_NE(parent_pgrp, ps.pgrp); in TEST()
398 ASSERT_EQ(ps.pid, ps.pgrp); in TEST()
423 ProcStatus ps = {}; in TEST()
424 GetChildStatus(&sa, &ps); in TEST()
430 EXPECT_EQ(expected_blocked, ps.sigblk); in TEST()
434 EXPECT_EQ(expected_ignored, ps.sigign); in TEST()
460 ProcStatus ps = {}; in TEST()
461 GetChildStatus(&sa, &ps); in TEST()
466 EXPECT_EQ(expected_blocked, ps.sigblk); in TEST()
471 EXPECT_EQ(expected_ignored, ps.sigign); in TEST()