aboutsummaryrefslogtreecommitdiff
path: root/smash/exec.c
diff options
context:
space:
mode:
authorNathan P. Reiner <nathan@nathanreiner.xyz>2022-12-16 09:33:11 +0100
committerNathan P. Reiner <nathan@nathanreiner.xyz>2022-12-16 09:33:11 +0100
commit10c4a9af585869da2d26c136c49cc79f2ca45e50 (patch)
tree9ac955df56f1bf3e245312f5e370bd287f32d0bf /smash/exec.c
parentd29b2c8af98f34745eca362fb1d65002170e7156 (diff)
implement wstdf
Diffstat (limited to 'smash/exec.c')
-rw-r--r--smash/exec.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/smash/exec.c b/smash/exec.c
index 3b62f41..cd18ca4 100644
--- a/smash/exec.c
+++ b/smash/exec.c
@@ -6,9 +6,9 @@
#include "../lib/sys/pipe.h"
#include "../lib/sys/dup2.h"
#include "../lib/sys/close.h"
-#include "../lib/sys/io.h"
#include "../lib/sys/exit.h"
#include "../lib/cstr/cstr.h"
+#include "../lib/io/io.h"
#include "parser.h"
#include "builtin.h"
@@ -58,9 +58,7 @@ void exec(char *line)
close(pipefd[1][PIPE_IN]);
execve(argv[0], argv, envp);
- write(STDOUT_FD, "command not found: ", 19);
- write(STDOUT_FD, argv[0], cstr_length(argv[0]));
- write(STDOUT_FD, "\n", 1);
+ wstdf("command not found: %s\n", argv[0]);
exit(-1);
}