blob: 02c678564b8a0e54ca54030e45ab37132a18f1f6 [file] [log] [blame]
#ifndef AOS_UTIL_RUN_COMMAND_H_
#define AOS_UTIL_RUN_COMMAND_H_
namespace aos {
namespace util {
// Improved replacement for system(3). Doesn't block signals like system(3) and
// is thread-safe. Also makes sure all 3 standard streams are /dev/null.
//
// This means that it passes command to `/bin/sh -c` and returns -1 or a status
// like from wait(2).
int RunCommand(const char *command);
} // namespace util
} // namespace aos
#endif // AOS_UTIL_RUN_COMMAND_H_