mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-11-28 11:05:17 +03:00
17 lines
267 B
C
17 lines
267 B
C
#include <stdlib.h>
|
|
|
|
#ifndef _WIN32
|
|
#include <sys/wait.h>
|
|
#endif
|
|
|
|
#include "idris_system.h"
|
|
|
|
int idris2_system(const char *command) {
|
|
int status = system(command);
|
|
#ifdef _WIN32
|
|
return status;
|
|
#else
|
|
return WIFEXITED(status) ? WEXITSTATUS(status) : -1;
|
|
#endif
|
|
}
|