16 lines
662 B
Diff
16 lines
662 B
Diff
|
--- a/unix.c 2024-10-08 12:30:18.785111397 +0200
|
||
|
+++ b/unix.c 2024-10-08 12:32:09.580923368 +0200
|
||
|
@@ -165,7 +165,11 @@ pid_t invoke(copy_info_t *ui, command_in
|
||
|
/* We could redirect them here. This might be useful for VMS? */
|
||
|
*(si->command_ptr) = cmd;
|
||
|
si->invoke_args[0] = si->shell;
|
||
|
- execve(si->shell, si->invoke_args, env);
|
||
|
+ if (execve(si->shell, si->invoke_args, env) != 0) {
|
||
|
+ fprintf (stderr, "Can't execute command: %s(%d)\n",
|
||
|
+ STRERROR(errno), errno);
|
||
|
+ specinvoke_exit (1, si);
|
||
|
+ }
|
||
|
} else { /* Parent */
|
||
|
ui->pid = pid;
|
||
|
fprintf (si->outfp,
|