the first signal received. No change for SIGCONT and SIGWINCH, but for
other signals, return to the application program and let that program
decide what to do, typically either exit or provide a fresh prompt.
Bug originally reported by deraadt@ regarding behaviour of Ctrl-C
in sftp(1). With this patch, sftp(1) no longer ignores Ctrl-C but
exists, and the same applies to a few other programs. Some others
that used to ignore Ctrl-C now provide a fresh prompt instead.
For several, behaviour is unchanged. At this point, i'm not aware
of a serious regression in any program.
OK deraadt@ martijn@ and no objection from millert@.
Patch also tested by claudio@ with bgplgsh(8).
-/* $OpenBSD: read.c,v 1.45 2021/08/09 09:11:26 schwarze Exp $ */
+/* $OpenBSD: read.c,v 1.46 2021/08/10 14:28:10 schwarze Exp $ */
/* $NetBSD: read.c,v 1.100 2016/05/24 19:31:27 christos Exp $ */
/*-
return -1;
return 0;
- case EINTR:
- return 0;
-
default:
return -1;
}