]> sourceware.org Git - glibc.git/commit
posix: Fix tst-spawn6 terminal handling (BZ #28853)
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 2 Feb 2022 21:31:59 +0000 (18:31 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 3 Feb 2022 11:04:08 +0000 (08:04 -0300)
commita9d35765728cbc5b66af5eeda5428298bccf9b69
tree95218a2dedd1ba81e1641f639dcb6f55f5f89795
parente8faf48321aa47f7d5e4690acf051db3d98467d7
posix: Fix tst-spawn6 terminal handling (BZ #28853)

The test changes the current foreground process group, which might
break testing depending of how the make check is issued.  For instance:

  nohup make -j1 test t=posix/tst-spawn6 | less

Will set 'make' and 'less' to be in the foreground process group in
the current session.  When tst-spawn6 new child takes over it becomes
the foreground process and 'less' is stopped and backgrounded which
interrupts the 'make check' command.

To fix it a pseudo-terminal is allocated, the test starts in new
session (so there is no controlling terminal associated), and the
pseudo-terminal is set as the controlling one (similar to what
login_tty does).

Checked on x86_64-linux-gnu.

Tested-by: Carlos O'Donell <carlos@redhat.com>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
posix/tst-spawn6.c
This page took 0.040654 seconds and 5 git commands to generate.