poor console performance if dbus-launch run with "--exit-with-session"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dbus (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Running dbus-launch from the console results in very poor performance (keyboard keys need to be held down for multiple seconds for an echo of that character to appear on the console).
To recreate:
killall dbus-launch &>/dev/null
eval `dbus-launch --auto-syntax --exit-
start typing :-)
Note that the problem only occurs with "--exit-
killall dbus-launch &>/dev/null
eval `dbus-launch --auto-syntax`
Problem appears to be related to function tools/dbus-
Poor performance observed in oneiric VM (kvm).
The same problem affects me also (I login to remote server via ssh with X11 forwarding).
The real problem is that dbus-launch is "eating" chars from stdin (tty) while waiting for SIGHUP.
I don't understand what for it's reading stdin while waiting for SIGHUP...
Below is a smple code:
------------
if (tty_fd >= 0)
{
if (FD_ISSET (tty_fd, &read_set))
{
int bytes_read;
char discard[512];
if (bytes_read == 0)
kill_ bus_and_ exit (0); /* EOF */
/* This shouldn't happen I don't think; to avoid
* spinning on the fd forever we exit.
*/
fprintf (stderr, "dbus-launch: error reading from stdin: %s\n",
strerror (errno));
kill_ bus_and_ exit (0);
verbose ("TTY has error condition\n");
else if (bytes_read < 0 && errno != EINTR)
{
}
}
else if (FD_ISSET (tty_fd, &err_set))
{
}
}
}
--------------