src/openvt.c: Close fd0 in parent after child has returned
PATCH 1/1 src/openvt.c: Close fd0 in parent after child has returned
The race condition fix (commit 9d987…) introduces a regression which causes the parent to leave open the file descriptor pointing to the VT opened. This causes VT_DISALLOCATE to fail with an EBUSY error.
Fixed by closing fd0 in the do_wait stanza.
Signed-off-by Michael Schutte <[email protected]>
--- src/openvt.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
src/openvt.c +2 -0
@@ -304,6 +304,8 @@ got_vtno:if ( do_wait ) {wait (&status); +if (!direct_exec) +close (fd0);if (show) {/* Switch back... */ if (ioctl (consfd,VT_ACTIVATE , vtstat.v_active)) {perror ("VT_ACTIVATE" );
Signature · 1 line
1.5.4.4
Quoted 7 lines · Michael Schutte
The race condition fix (commit 9d987…) introduces a regression which causes the parent to leave open the file descriptor pointing to the VT opened. This causes
VT_DISALLOCATEto fail with an EBUSY error.Fixed by closing fd0 in the
do_waitstanza.Signed-off-by Michael Schutte <[email protected]>
Thanks!
But this patch is not for 1.14.1 branch.
This bug is fixed already.
Signature · 1 line
Rgrds, legion