mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-01-07 00:40:16 +01:00
[main] Handle OOM in reload watch
http://bugs.freedesktop.org/show_bug.cgi?id=12953 Wait for memory if we can't init the string. Based on an original patch by Kimmo Hämäläinen <kimmo.hamalainen@nokia.com>
This commit is contained in:
parent
efc63e58da
commit
322c116a53
1 changed files with 4 additions and 1 deletions
|
|
@ -156,7 +156,10 @@ handle_reload_watch (DBusWatch *watch,
|
|||
{
|
||||
DBusError error;
|
||||
DBusString str;
|
||||
_dbus_string_init (&str);
|
||||
|
||||
while (!_dbus_string_init (&str))
|
||||
_dbus_wait_for_memory ();
|
||||
|
||||
if ((reload_pipe[RELOAD_READ_END] > 0) &&
|
||||
_dbus_read_socket (reload_pipe[RELOAD_READ_END], &str, 1) != 1)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue