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:
Robert Love 2006-01-04 17:54:42 +00:00
parent 959b98d58c
commit 0dcbec9372

View file

@ -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);
}
}