diff options
author | Galen Guyer <galen@galenguyer.com> | 2021-04-24 15:40:02 -0400 |
---|---|---|
committer | Galen Guyer <galen@galenguyer.com> | 2021-04-24 15:40:02 -0400 |
commit | 713f0eb14cc74384753bcf86b9d63e66db20a54a (patch) | |
tree | a72c22b52d8680828469b90b7be16409e388f018 /composer.c | |
parent | df02703679d9240b241a990368349e4487b01ed9 (diff) |
Print the error if one occurs
Diffstat (limited to 'composer.c')
-rw-r--r-- | composer.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1,6 +1,10 @@ +#include <stdio.h> #include <unistd.h> #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 |