We are generally interested that the subcommand ran without
error, ie. had exit status of 0. 'pclose' returns the exit
status, so we now check that pclose (fp) != 0.
return NULL;
}
}
- if (pclose (fp) == -1) {
+ if (pclose (fp) != 0) {
reply_with_perror ("pclose: find");
free_stringslen (res, size);
return NULL;
return NULL;
}
- if (pclose (fp) == -1) {
+ if (pclose (fp) != 0) {
reply_with_perror ("pclose");
free_strings (filenames);
return NULL;
return -1;
}
- if (pclose (fp) == -1) {
+ if (pclose (fp) != 0) {
err = errno;
cancel_receive ();
errno = err;
return -1;
}
- if (pclose (fp) == -1) {
+ if (pclose (fp) != 0) {
perror (dir);
send_file_end (1); /* Cancel. */
return -1;
return -1;
}
- if (pclose (fp) == -1) {
+ if (pclose (fp) != 0) {
err = errno;
cancel_receive ();
errno = err;
return -1;
}
- if (pclose (fp) == -1) {
+ if (pclose (fp) != 0) {
perror (dir);
send_file_end (1); /* Cancel. */
return -1;