summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2015-11-15 03:59:59 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2015-11-15 03:59:59 +0000
commit69c05c719ea47cd9d5810ffee8e685bbcafa1dba (patch)
tree63f594ecc50ace249cba75c5086d5018c96d24c2 /Build
parentc89886bd0aa4448961266c5fdd6ef6b78035a7e0 (diff)
web2c/lib/texmfmp.c: Show return code of system() if it is not zero.
git-svn-id: svn://tug.org/texlive/trunk@38855 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/web2c/lib/ChangeLog4
-rw-r--r--Build/source/texk/web2c/lib/texmfmp.c9
2 files changed, 11 insertions, 2 deletions
diff --git a/Build/source/texk/web2c/lib/ChangeLog b/Build/source/texk/web2c/lib/ChangeLog
index 10cc93ee205..c4d82416a7c 100644
--- a/Build/source/texk/web2c/lib/ChangeLog
+++ b/Build/source/texk/web2c/lib/ChangeLog
@@ -1,3 +1,7 @@
+2015-11-15 Akira Kakuto <kakuto@fuk.kinidai.ac.jp>
+
+ * texmfmp.c: Show return code of system() if it is not zero.
+
2015-11-01 Akira Kakuto <kakuto@fuk.kinidai.ac.jp>
* texmfmp.c: Improve restricted shell escape for w32 a little.
diff --git a/Build/source/texk/web2c/lib/texmfmp.c b/Build/source/texk/web2c/lib/texmfmp.c
index 83555e3b16a..75c846a339b 100644
--- a/Build/source/texk/web2c/lib/texmfmp.c
+++ b/Build/source/texk/web2c/lib/texmfmp.c
@@ -536,6 +536,7 @@ runsystem (const char *cmd)
int allow = 0;
char *safecmd = NULL;
char *cmdname = NULL;
+ int status = 0;
if (shellenabledp <= 0) {
return 0;
@@ -548,9 +549,13 @@ runsystem (const char *cmd)
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);