mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-08 01:00:36 +01:00
make a vague attempt at checking write(2)'s error code.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1262 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
parent
959b98d58c
commit
0dcbec9372
1 changed files with 3 additions and 3 deletions
|
|
@ -71,12 +71,12 @@ child_stdout_data_cb (GIOChannel *source, GIOCondition condition, gpointer userd
|
|||
if (++io_user_data->num_newlines == 2) {
|
||||
char buf[1];
|
||||
/* terminate the child */
|
||||
write (io_user_data->child_stdin, buf, sizeof (buf));
|
||||
}
|
||||
if (write (io_user_data->child_stdin, buf, sizeof (buf)) == -1)
|
||||
goto out;
|
||||
}
|
||||
} else if (len > 0) {
|
||||
/* remove terminating newline */
|
||||
str[len - 1] = '\0';
|
||||
|
||||
*passwords = g_slist_append (*passwords, str);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue