1. Return values

I have noticed that the function system_exec do not get the right values returned by external programs (exit status) in Linux, but multiplied by 256. Example:

file prog1.ex: 
abort(1) 
 
file prog2.ex: 
? system_exec("exu prog1.ex", 2) 
 
$ exu prog2.ex 
256 

If "abort(2)", the reported value is 512, etc.

Is it normal? It happens in all platforms? (I think no).

Regards, Rodolfo.

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu