diff options
Diffstat (limited to 'Build/source/texk/web2c/lib')
-rw-r--r-- | Build/source/texk/web2c/lib/ChangeLog | 4 | ||||
-rw-r--r-- | Build/source/texk/web2c/lib/texmfmp.c | 9 |
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); |