summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-03-23 01:26:04 +0000
committerAndrew Tridgell <tridge@samba.org>2001-03-23 01:26:04 +0000
commit19b27a485e833e08160ef0bae8f604c6f60e5ef8 (patch)
treec9a231fcdecd11884aacbc2dbf93262e5c5ad8de /util.c
parentff81e809f46293171a332a2faa320aca57277b4b (diff)
downloadrsync-19b27a485e833e08160ef0bae8f604c6f60e5ef8.tar.gz
rsync-19b27a485e833e08160ef0bae8f604c6f60e5ef8.tar.bz2
rsync-19b27a485e833e08160ef0bae8f604c6f60e5ef8.zip
improved error handling again. Now we report messages for the remote
shell failing and propogate errors in a better fashion
Diffstat (limited to 'util.c')
-rw-r--r--util.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/util.c b/util.c
index 48935cc4..d917f07b 100644
--- a/util.c
+++ b/util.c
@@ -93,9 +93,9 @@ int fd_pair(int fd[2])
used to cope with badly broken rsh implementations like the one on
solaris.
*/
-int piped_child(char **command,int *f_in,int *f_out)
+pid_t piped_child(char **command,int *f_in,int *f_out)
{
- int pid;
+ pid_t pid;
int to_child_pipe[2];
int from_child_pipe[2];
extern int blocking_io;
@@ -108,7 +108,7 @@ int piped_child(char **command,int *f_in,int *f_out)
pid = do_fork();
- if (pid < 0) {
+ if (pid == -1) {
rprintf(FERROR,"fork: %s\n",strerror(errno));
exit_cleanup(RERR_IPC);
}
@@ -148,9 +148,9 @@ int piped_child(char **command,int *f_in,int *f_out)
return pid;
}
-int local_child(int argc, char **argv,int *f_in,int *f_out)
+pid_t local_child(int argc, char **argv,int *f_in,int *f_out)
{
- int pid;
+ pid_t pid;
int to_child_pipe[2];
int from_child_pipe[2];
@@ -162,7 +162,7 @@ int local_child(int argc, char **argv,int *f_in,int *f_out)
pid = do_fork();
- if (pid < 0) {
+ if (pid == -1) {
rprintf(FERROR,"fork: %s\n",strerror(errno));
exit_cleanup(RERR_IPC);
}