No need to execute restore_term explicitly
This commit is contained in:
parent
82ffbac28b
commit
c57ce145ea
3
attach.c
3
attach.c
|
|
@ -240,7 +240,6 @@ attach_main(int noerror)
|
|||
n = select(s + 1, &readfds, NULL, NULL, NULL);
|
||||
if (n < 0 && errno != EINTR && errno != EAGAIN)
|
||||
{
|
||||
restore_term();
|
||||
printf(EOS "[select failed]\r\n");
|
||||
exit(1);
|
||||
}
|
||||
|
|
@ -252,13 +251,11 @@ attach_main(int noerror)
|
|||
|
||||
if (len == 0)
|
||||
{
|
||||
restore_term();
|
||||
printf(EOS "[EOF - dtach terminating]\r\n");
|
||||
exit(0);
|
||||
}
|
||||
else if (len < 0)
|
||||
{
|
||||
restore_term();
|
||||
printf(EOS "[read returned an error]\r\n");
|
||||
exit(1);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue