moo_term_pt_send_intr(); handle EAGAIN and EINTR in read_child()

master
Yevgen Muntyan 2005-07-15 09:48:18 +00:00
parent 4155ad4596
commit 5f88b72861
1 changed files with 15 additions and 3 deletions

View File

@ -336,9 +336,13 @@ static gboolean read_child_out (G_GNUC_UNUSED GIOChannel *source,
switch (r)
{
case -1:
error_occured = TRUE;
error_no = errno;
goto error;
if (errno != EAGAIN && errno != EINTR)
{
error_occured = TRUE;
error_no = errno;
goto error;
}
break;
case 0:
break;
@ -633,3 +637,11 @@ char moo_term_pt_get_erase_char (MooTermPt *pt_gen)
return 0;
}
}
void moo_term_pt_send_intr (MooTermPt *pt)
{
g_return_if_fail (pt->priv->child_alive);
pt_flush_pending_write (pt);
pt_write (pt, "\003", 1);
}