aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormcpcpc <michaelczigler@icloud.com>2020-09-18 07:39:01 -0400
committermcpcpc <michaelczigler@icloud.com>2020-09-18 07:39:01 -0400
commitb32cd6251ce41b936ec31d4b1c427307efeb4381 (patch)
treec9c3c15f998d3c074ea53d99b21f53b563defd01
parentfix sscanf to accept a-z values (diff)
downloadkirc-b32cd6251ce41b936ec31d4b1c427307efeb4381.tar.gz
kirc-b32cd6251ce41b936ec31d4b1c427307efeb4381.tar.bz2
kirc-b32cd6251ce41b936ec31d4b1c427307efeb4381.tar.xz
kirc-b32cd6251ce41b936ec31d4b1c427307efeb4381.tar.zst
kirc-b32cd6251ce41b936ec31d4b1c427307efeb4381.zip
revert retest write commit
Diffstat (limited to '')
-rw-r--r--kirc.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/kirc.c b/kirc.c
index ea51ec5..1c43bef 100644
--- a/kirc.c
+++ b/kirc.c
@@ -77,11 +77,10 @@ raw(char *fmt, ...) {
if (verb) printf("<< %s", cmd_str);
if (olog) log_append(cmd_str, olog);
-
- ssize_t rc;
- do {
- rc = write(conn, cmd_str, strlen(cmd_str));
- } while ((rc < 0) && (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK));
+ if (write(conn, cmd_str, strlen(cmd_str)) < 0) {
+ perror("write");
+ exit(EXIT_FAILURE);
+ }
free(cmd_str);
}