summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2003-04-29 08:21:44 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2003-04-29 08:21:44 +0000
commit939d5e3c555ddcde3c9c4071d1c3e30825831622 (patch)
tree9ec566f643cecaa055982a295841398dfbefd74f
parentf1a7d632d5b51d0b19e24d89591b82db7e7f99b8 (diff)
Minor fixes
-rw-r--r--progs/tests/sample_server2.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/progs/tests/sample_server2.c b/progs/tests/sample_server2.c
index 6bb582be347..dfb80d12ecc 100644
--- a/progs/tests/sample_server2.c
+++ b/progs/tests/sample_server2.c
@@ -1,4 +1,4 @@
-/* $Id: sample_server2.c,v 1.1.2.2 2003/04/25 09:37:29 keithw Exp $ */
+/* $Id: sample_server2.c,v 1.1.2.3 2003/04/29 08:21:44 keithw Exp $ */
/*
* Sample server that just keeps first available window mapped.
@@ -89,9 +89,7 @@ int main( int argc, char *argv[] )
/* This can happen if select() is interrupted by a signal:
*/
- if (r < 0) {
- if (errno == EINTR || errno == EAGAIN)
- continue;
+ if (r < 0 && errno != EINTR && errno != EAGAIN) {
perror ("select()");
exit (1);
}
@@ -107,7 +105,7 @@ int main( int argc, char *argv[] )
r = read(0, rbuf, BUFSZ);
if (r < 1) {
perror("read");
- exit(1);
+ abort();
}
rbuf_count = r;
}
@@ -118,7 +116,7 @@ int main( int argc, char *argv[] )
r = write(1, rbuf, rbuf_count);
if (r < 1) {
perror("write");
- exit(1);
+ abort();
}
rbuf_count -= r;
if (rbuf_count)