Commit b6bef8d7 b6bef8d7420babdc452f6cbd9ce5327640a8981a by Sergey Poznyakoff

Handle interrupts when fetching message body.

1 parent 7af90e80
......@@ -81,6 +81,11 @@ mail_print (int argc, char **argv)
while (stream_read (stream, buffer, sizeof (buffer) - 1, off, &n) == 0
&& n != 0)
{
if (ml_got_interrupt())
{
util_error("\nInterrupt");
break;
}
buffer[n] = '\0';
fprintf (out, "%s", buffer);
off += n;
......@@ -89,7 +94,7 @@ mail_print (int argc, char **argv)
pclose (out);
message_get_attribute (mesg, &attr);
attribute_set_read (attr);
attribute_set_seen (attr);
return 0;
}
......