-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
rhel-9.5
-
No
-
Moderate
-
Customer Facing
-
rhel-sst-idm-sssd
-
ssg_idm
-
None
-
False
-
-
None
-
Red Hat Enterprise Linux
-
None
-
-
x86_64
-
None
What were you trying to do that didn't work?
When a shell script containing the commands vipw and read is executed, it stops in the middle.
[root@rhel9-minimal ~]# ./test.sh
vipw: /etc/passwd is unchanged
Enter any key
[2]+ Stopped ./test.sh
It stops by SIGTTOU before executing the read command.
[root@rhel9-minimal ~]# jobs -l
[1]+ 61799 Stopped (tty output) ./test.sh
The cause is this commit.
Fix vipw not resuming correctly when suspended
I assume the following lines that sets the process group is affected.
/* Run child in a new pgrp and make it the foreground pgrp. */ if (orig_pgrp != -1) { setpgid(pid, pid); tcsetpgrp(STDIN_FILENO, pid);
- My customer is asking for improvements.
Please provide the package NVR for which the bug is seen:
- shadow-utils-4.9-9.el9.x86_64
How reproducible is this bug?:
- Always
Steps to reproduce
1. Create the following script file:
-- test.sh -- #!/bin/bash /usr/sbin/vipw echo Enter any key read -s echo END
2. Run the script
# chmod +x test.sh
# ./test.sh
Expected results
- The script outputs “END” and completes. It works on RHEL8.
[root@rhel8 ~]# ./test.sh
vipw: /etc/passwd is unchanged
Input enter to continue
END
Actual results
- The script stops by SIGTTOU.
[root@rhel9-minimal ~]# ./test.sh
vipw: /etc/passwd is unchanged
Enter any key
[1]+ Stopped ./test.sh
[root@rhel9-minimal ~]# jobs -l
[1]+ 61799 Stopped (tty output) ./test.sh
- account is impacted by
-
RHEL-72940 vipw/vigr affect bash because it does not restore terminal pgid.
-
- Planning
-