]> code.ossystems Code Review - openembedded-core.git/commit
ptest-runner: enable child procs as session leader
authorRandy MacLeod <Randy.MacLeod@windriver.com>
Sun, 16 Jun 2019 15:48:16 +0000 (11:48 -0400)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 18 Jun 2019 10:21:40 +0000 (11:21 +0100)
commit83795a83505a311058130c662ff3342b0e39e67f
tree9094e60317076f973835e55f093ed09fd08fba3b
parent9592b318ccd6a8dca60d1060c8255ed8e62ef046
ptest-runner: enable child procs as session leader

When running the run-execscript bash ptest as a user rather than root, a warning:
  bash: cannot set terminal process group (16036): Inappropriate ioctl for device
  bash: no job control in this shell
contaminates the bash log files causing the test to fail. This happens only
when run under ptest-runner and not when interactively testing!

The changes made to fix this include:
1. Get the process group id (pgid) before forking,
2. Set the pgid in both the parent and child to avoid a race,
3. Find, open and set permission on the child tty, and
4. Allow the child to attach to controlling tty.

Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-support/ptest-runner/ptest-runner/0004-utils-ensure-child-can-be-session-leader.patch [new file with mode: 0644]
meta/recipes-support/ptest-runner/ptest-runner_2.3.1.bb