From 713f0eb14cc74384753bcf86b9d63e66db20a54a Mon Sep 17 00:00:00 2001 From: Galen Guyer Date: Sat, 24 Apr 2021 15:40:02 -0400 Subject: Print the error if one occurs --- composer.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'composer.c') diff --git a/composer.c b/composer.c index 5ad0273..0e68400 100644 --- a/composer.c +++ b/composer.c @@ -1,6 +1,10 @@ +#include #include #define COMMAND "echo" int main(int argc, char** argv) { - execvp(COMMAND, argv); + int result = execvp(COMMAND, argv); + if (result < 0) { + perror(COMMAND); + } } \ No newline at end of file -- cgit v1.2.3