Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Nov 1997 15:10:16 -0000
From:      "Bond, Jeffery" <Jeff.Bond@nectech.co.uk>
To:        "'questions@freebsd.org'" <questions@freebsd.org>
Cc:        "'cao@bus.net'" <cao@bus.net>
Subject:   RE: /dev/speaker
Message-ID:  <014CB6ADC0BCD0118B1B006097827D5B022D1B@exchange>

next in thread | raw e-mail | index | archive | help
Chuck O'Donnell wrote:

>Does anyone know a good way to beep the speaker from a CGI script?
>
>I would rather not change permissions of /dev/speaker or use a setuid
>script (as when using open("/dev/speaker", O_WRONLY, 0)). Just in case
it
>matters, the script is written in C.
>
>I am not subscribed to this list so please send responses directly.
>
>Thank you.
>
>Chuck O'Donnell

Just send a BEL character (ASCII 7) to stdout. eg.

printf("\x07"); (in C)

or

cout << (char)7; (in C++)

should work just fine.

Jeff Bond.


---------------------------------------------------
Jeffery Bond
<mailto:jeffbond@compuserve.com>
<http://ourworld.compuserve.com/homepages/jeffbond>;
---------------------------------------------------





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?014CB6ADC0BCD0118B1B006097827D5B022D1B>