moo_term_pt_send_intr(); handle EAGAIN and EINTR in read_child()
parent
4155ad4596
commit
5f88b72861
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue