popen support

This commit is contained in:
Vitor Santos Costa
2018-04-24 17:51:00 +01:00
parent 2c1d6910de
commit af848f28aa
10 changed files with 788 additions and 750 deletions

View File

@@ -729,7 +729,15 @@ static YAP_Bool execute_command(void) {
#endif /* UNIX code */
}
/* execute a command as a detached process */
/** @pred system(+ _S_)
Passes command _S_ to the Bourne shell (on UNIX environments) or the
current command interpreter in WIN32 environments.
Note that it executes them command as a detached process. It requires
`system` to be implemented by the system library.
*/
static YAP_Bool do_system(void) {
char *command = (char *)YAP_AtomName(YAP_AtomOfTerm(YAP_ARG1));
#if HAVE_SYSTEM