2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
12 #include <sys/param.h>
14 #include "docommand.h"
17 static void _docommandv(const char *command
, char *argv
[], int do_path
)
23 fatal("vfork()", strerror(errno
));
27 (do_path
? execvp
: execv
)(command
, argv
);
29 nonfatal(command
, strerror(errno
));
34 waitpid(pid
, &status
, 0);
35 if (WEXITSTATUS(status
) != 0)
39 void docommandv(const char *command
, char *argv
[])
41 _docommandv(command
, argv
, 0);
44 void docommandvp(const char *command
, char *argv
[])
47 _docommandv(command
, argv
, 1);