When the program_input is NULL, the stream is finished, meaning that the
exit_code is set based on the return code. There can be a program_input for
remote streams, even when the program produces no output.
struct program_client_remote *prclient =
(struct program_client_remote *)pclient;
- if (pclient->error == PROGRAM_CLIENT_ERROR_NONE && !prclient->noreply &&
- pclient->program_input != NULL && !force) {
+ if (pclient->program_input == NULL) {
+ /* nothing */
+ } else if (pclient->error == PROGRAM_CLIENT_ERROR_NONE &&
+ !prclient->noreply && !force) {
const unsigned char *data;
size_t size;