--wait option not working as expected (3.28)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gnome-terminal (Ubuntu) |
Fix Released
|
Low
|
Unassigned |
Bug Description
[Impact]
Users are unable to launch an asynchronous gnome-terminal. In some cases, a user/program/script might want to run a gnome-terminal with a provided command and wait till the launched gnome-terminal exits.
By default, gnome-terminal runs synchronously as it uses the gnome-server to handle the requests. To solve that, gnome-terminal 3.27.1 introduced the --wait option which solves this issue. The problem, is that --wait flag does not work properly till version >= 3.36 which also uses a new vte version (libvte-
More information: https:/
[Test Case]
To reproduce the bug let's assume that we want to open a gnome-terminal with a provided command, for example a simple bash:
1- Open a terminal:
gnome-terminal -- /bin/sh -c "/bin/bash"
This will launch gnome-terminal with a bash but the parent process in the first terminal finishes just after executing the command, even if the gnome-terminal is opened.
2- Include the --wait option to make the command call asynchronous:
gnome-terminal --wait -- /bin/sh -c "/bin/bash"
- Now you can see int the first terminal that the processes didn't finish, instead it is waiting for the launched gnome-terminal.
To see the explained bug try to close the opened gnome-terminal using the X icon windows or File-> Close Tab. => The parent process in terminal 1 does not receive the child-exited signal, thus it keeps waiting forever.
However if we try to exit from the launched gnome-terminal by typing "exit" on it, the parent process does receive the corresponding signal.
[Regression Potential]
As mentioned before, this bug was solved in gnome-terminal >= 3.36
Many users use the GUI options in order to finish a process, so this bug prevents developers to take advantage of the --wait option in its programs.
The version 3.36 is included in new Ubuntu versions but not in the bionic one(Ubuntu 18.04). Many users and enterprises are still using Ubuntu 18.04 as the new LTS has just been released a few days ago.
[Other Info]
Initial bug report:
Dear Maintainers,
We have developed a program that it launches a new gnome-terminal with a ssh tunnel connection. Basically, the program forwards a local port to the destination address and opens a new terminal with a ssh connection to the local port:
gnome-terminal -e "/usr/bin/ssh -o XXX -p XXX ubuntu@127.0.0.2"
The problem comes when we need to know when this gnome-terminal session has finished, in order to end the tunnel process. As you might know, the gnome-terminal command fires up gnome-terminal-
In previous version there was the --disable-factory option, but unfortunately now is deprecated. Because of this type of problem it was added the --wait flag which was introduced in 3.27.1:
gnome-terminal --wait -e "/usr/bin/ssh -o XXX -p XXX ubuntu@127.0.0.2"
Nevertheless, there's a bug in this version.
You can reproduced by launching a new gnome-terminal with the --wait flag from a gnome-terminal session and try to close it via a window operation. In that version --wait only works if with the exit command in the opened session.
As mentioned in the linked URL this is solved in version >= 3.36 which also uses a new vte version (libvte-
Shall we update the libvte version used by gnome? The last libvte version has the proper child exit SIGNAL handler which solves the described issue.
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: gnome-terminal 3.28.1-1ubuntu1
Architecture: amd64
tags: | added: upgrade-software-version |
summary: |
- Update g-t 3.36 version to solve --wait issue(bionic) + --wait option not working as expected (3.28) |
description: | updated |
description: | updated |
Thank you for taking the time to report this bug and helping to make Ubuntu better. However, I am closing it because the bug has been fixed in the current version of Ubuntu.
This is a significant bug in Ubuntu. If you need a fix for the bug in previous versions of Ubuntu, please perform as much as possible of the SRU Procedure [1] to bring the need to a developer's attention.
[1]: https:/ /wiki.ubuntu. com/StableRelea seUpdates# Procedure