On Wed, January 1, 2014 20:48, Mark Morgan Lloyd wrote: > When reading characters from a program's stdin using fpRead(), what's > the best way of suppressing ^C so that it doesn't raise SIGTERM or > whatever? I want to be able to handle signals indicating e.g. a UPS > power-failure message, but not to get trivial stuff from the keyboard. > > Platform is predominantly Linux, possibly also Solaris and one of the > BSDs. Anybody porting the program to Windows will have to do their own > dirty work :-)
The general platform independent solution would have been 'Crt.CheckBreak := false' (or System.SysSetCtrlBreakHandler without unit Crt should you not use/need that) - except for the fact that maintainers of most platforms (all those mentioned by you) decided not to implement/support this functionality and thus it would not work for those platforms you are interested in... :-/ Tomas _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal