diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2015-11-15 03:48:57 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2015-11-15 03:48:57 +0000 |
commit | c89886bd0aa4448961266c5fdd6ef6b78035a7e0 (patch) | |
tree | e40ba38c883e2acdbe37cd5508f5909d3c9b4bf9 /Build/source/texk/web2c/luatexdir/luatex.c | |
parent | 690d94784c133d0cee9298485f4a574a67e5e1b3 (diff) |
web2c/luatexdir: Sync with the upstream trunk.
git-svn-id: svn://tug.org/texlive/trunk@38854 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/luatex.c')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/luatex.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Build/source/texk/web2c/luatexdir/luatex.c b/Build/source/texk/web2c/luatexdir/luatex.c index 726288a6176..43e1079191a 100644 --- a/Build/source/texk/web2c/luatexdir/luatex.c +++ b/Build/source/texk/web2c/luatexdir/luatex.c @@ -422,7 +422,7 @@ int runsystem(const char *cmd) int allow = 0; char *safecmd = NULL; char *cmdname = NULL; - + int status = 0; if (shellenabledp <= 0) { return 0; } @@ -432,12 +432,15 @@ int runsystem(const char *cmd) allow = 1; else allow = shell_cmd_is_allowed(cmd, &safecmd, &cmdname); - + if (allow == 1) - (void) system(cmd); + status = system(cmd); else if (allow == 2) - (void) system(safecmd); - + status = system(safecmd); + /* Not really meaningful, but we have to manage the return value of system. */ + if (status != 0) + fprintf(stderr,"system returned with code %d\n", status); + if (safecmd) free(safecmd); if (cmdname) |