[Gambas-user] get Return Code from program EXEC

Tobias Boege taboege at gmail.com
Sat Jan 25 14:45:40 CET 2020

On Sat, 25 Jan 2020, KKing wrote:
> Is it possible to get the return code from a program that is run via the
> EXEC command?
> I currently have
>    myProcess As Process
>    myProcess = Exec ["/home/test01/myPgm", sParameter01] Wait

Exec returns a Process object. The exit code is myProcess.Value,
but do read the documentation of it. If the process is terminated
by a signal (which you can check with myProcess.State), then you
get the signal number there instead.


"There's an old saying: Don't change anything... ever!" -- Mr. Monk

More information about the User mailing list