diff options
author | Bruno Haible <bruno@clisp.org> | 2002-11-22 22:12:02 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-06-23 12:08:52 +0200 |
commit | 6c8f15797cda1486bb7b6d92b2b6a2654af474b6 (patch) | |
tree | d6523ff17d1f229ffb89fad01faac1d7d230224f /src/msgexec.c | |
parent | 02df1aa0c0a75d4a019766c4fc9f68fff2cc3320 (diff) | |
download | external_gettext-6c8f15797cda1486bb7b6d92b2b6a2654af474b6.zip external_gettext-6c8f15797cda1486bb7b6d92b2b6a2654af474b6.tar.gz external_gettext-6c8f15797cda1486bb7b6d92b2b6a2654af474b6.tar.bz2 |
New calling convention for safe_read and full_write.
Diffstat (limited to 'src/msgexec.c')
-rw-r--r-- | src/msgexec.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/msgexec.c b/src/msgexec.c index 2de37cd..b936974 100644 --- a/src/msgexec.c +++ b/src/msgexec.c @@ -292,13 +292,10 @@ nonintr_close (int fd) static void process_string (const message_ty *mp, const char *str, size_t len) { - ssize_t nwritten; - if (strcmp (sub_name, "0") == 0) { /* Built-in command "0". */ - nwritten = full_write (STDOUT_FILENO, str, len + 1); - if (nwritten != (ssize_t) (len + 1)) + if (full_write (STDOUT_FILENO, str, len + 1) < len + 1) error (EXIT_FAILURE, errno, _("write to stdout failed")); } else @@ -320,8 +317,7 @@ process_string (const message_ty *mp, const char *str, size_t len) child = create_pipe_out (sub_name, sub_path, sub_argv, NULL, false, true, fd); - nwritten = full_write (fd[0], str, len); - if (nwritten != (ssize_t) len) + if (full_write (fd[0], str, len) < len) error (EXIT_FAILURE, errno, _("write to %s subprocess failed"), sub_name); |