[fpc-pascal]Exit codes of called programs.
Jonas Maebe
jonas at zeus.ugent.be
Wed Apr 16 13:31:05 CEST 2003
On dinsdag, apr 15, 2003, at 10:50 Europe/Brussels, A.J. Venter wrote:
> I often write frontends for commandline programs.
> When I need their output, I call assignstream, when I don't I use
> shell.
>
> What I would like however, is a way to check the exit codes of such
> programs, so that I can for example tell if a program failed to run
> correctly.
If you use shell, you can only get the exit code of the shell (since
that is the program that your program started). If you use Dos.exec(),
use the DosExitCode() function afterwards. AssignStream doesn't seem to
be able to return exitcodes.
Jonas
More information about the fpc-pascal
mailing list