From c89886bd0aa4448961266c5fdd6ef6b78035a7e0 Mon Sep 17 00:00:00 2001 From: Akira Kakuto Date: Sun, 15 Nov 2015 03:48:57 +0000 Subject: web2c/luatexdir: Sync with the upstream trunk. git-svn-id: svn://tug.org/texlive/trunk@38854 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/luatexdir/luatex.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'Build/source/texk/web2c/luatexdir/luatex.c') 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) -- cgit v1.2.3