forked from Lephenixnoir/fxsdk
fxlink: add a message if `cp` fails
This commit is contained in:
parent
6032ce38cf
commit
dd6cd3fcd4
10
fxlink/ud2.c
10
fxlink/ud2.c
|
@ -354,7 +354,15 @@ int main_send(filter_t *filter, delay_t *delay, char **files)
|
|||
goto end;
|
||||
}
|
||||
else {
|
||||
waitpid(pid, NULL, 0);
|
||||
int wstatus;
|
||||
waitpid(pid, &wstatus, 0);
|
||||
|
||||
if(!WIFEXITED(wstatus))
|
||||
err("process did not terminate normally");
|
||||
else if(WEXITSTATUS(wstatus) != 0) {
|
||||
err("process terminated with error %d",
|
||||
WEXITSTATUS(wstatus));
|
||||
}
|
||||
}
|
||||
|
||||
/* Unmount the filesystem and eject the device if we mounted it */
|
||||
|
|
Loading…
Reference in New Issue