mescc: Exit with non-zero exit code when subprocess fails.
authorPeter De Wachter <pdewacht@gmail.com>
Tue, 16 Oct 2018 18:40:35 +0000 (20:40 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Tue, 16 Oct 2018 18:40:35 +0000 (20:40 +0200)
commit053309e4dca4b04f1ad1b2c54c4972c4985012b5
tree8f7af26a86b5b76308e90af4eeeb7d164e3ca652
parentcc473c1d727e978f11d4b39cf16a9657f726a288
mescc: Exit with non-zero exit code when subprocess fails.

system* returns the result of waitpid. So, suppose that a subprocess
fails with exit code 1. Then the waitpid return value will be 256.
And exit(256) is equivalent to exit(0).

Modified-by: Jan Nieuwenhuizen <janneke@gnu.org>
* mes/module/mes/posix.mes (status:exit-val): New function.
* module/mescc/mescc.scm (assert-system*): Use it.
mes/module/mes/posix.mes
module/mescc/mescc.scm