[fpc-pascal] sysutils.beep doesn't beep under Linux?
Michael Van Canneyt
michael at freepascal.org
Fri Nov 20 13:17:49 CET 2009
On Fri, 20 Nov 2009, Graeme Geldenhuys wrote:
> Michael Van Canneyt wrote:
>>
>> No, because you don't know if a terminal is available or whether
>> standard output is writable.
>
> As far as I know stdout is always available for Linux. Even if I compile
> applications for X11 and launch them from a desktop icon, I can do
> writeln() calls without problems (unlike under Windows which will throw
> an error).
No, the application can (for instance almost all daemons do) close stdout.
Programs that use ncurses will also be messed-up.
For CGI programs, stdout is also reserved for the HTML output.
Imagine someone else's code doing a beep, and it ends up in your
HTML output.
Before you think that these are far-fetched:
If you'll remember, tiOPF had some very common (but nasty) windows-only
constructs like showing message boxes deeply buried in core functionality.
Works fine. Till I come along and want to run the thing on Linux. Bummer...
By that rationale: no beep() on linux.
Michael.
More information about the fpc-pascal
mailing list