[fpc-pascal] CTRL-Break and asynchronous exec
Tomas Hajny
XHajT03 at mbox.vol.cz
Fri Apr 10 19:19:12 CEST 2009
On Fri, April 10, 2009 18:10, Jürgen Hestermann wrote:
> > Marco van de Voort schrieb:
>> However in such cases
>> it is easiest to look how FPC's biggest console app (the textmode IDE)
>> does
>> it.
>
> Thanks Marco for the quick answer. I tried to find where the IDE does
> the keyboard input but without success. Where in these 97 files could it
> be? It seems that it doesn't use CRT/READKEY anyway. So is it a problem
> of the CRT unit?
IDE / FV is based on unit Keyboard, unit Crt is not (yet). General
infrastructure for support of this functionality exists in the common
parts of the FPC RTL, but it has not been added to all platforms yet (in
particular, the support is currently available for OS/2 and for GO32v2
targets; for those it works for both unit Crt and unit Keyboard, IIRC).
This functionality cannot be solved in completely platform independent
way, because the underlying operating system maps this combination to a
signal / exception and this needs to be addressed in platform specific
manner.
>> Do not use the dos.exec function. It has argument and path length
>> problems
>> (due to shortstrings), use the executeprocess function(s) instead. They
>> are
>> in sysutils.
>
> Maybe someone can add this hint to the manual in the description of the
> EXEC function when it is changed anyway some day. I always wondered
> whether the DOS unit can still be used or whether it's just there for
> compatibility reasons.
It is there mostly for compatibility. Nevertheless, in the case of the
OS/2 target this includes compatibility with VP/2, so the OS/2 version of
unit Dos provides ExecFlags as known in Virtual Pascal.
Tomas
More information about the fpc-pascal
mailing list