Audio-Beep

 view release on metacpan or  search on metacpan

beep-1.2.2/README  view on Meta::CPAN

up to a bug, but there's actually nothing I can do about it, and it really is 
a Good Thing that the kernel does things this way.  There is also a solution.

By default beep is not installed with the suid bit set, because that would 
just be zany.  On the other hand, if you do make it suid root, all your 
problems with beep bailing on ioctl calls will magically vanish, which is 
pleasant, and the only reason not to is that any suid program is a potential 
security hole.  Conveniently, beep is very short, so auditing it is pretty 
straightforward.

Decide for yourself, of course, but it looks safe to me - there's only one 
buffer and fgets doesn't let it overflow, there's only one file opening, and 
while there is a potential race condition there, it's with /dev/console.  If 
someone can exploit this race by replacing /dev/console, you've got bigger 
problems.  :)

So the quick solution is beep is not beeping when you want it to is:

$ su
Password:
# chmod 4755 /usr/bin/beep



( run in 0.314 second using v1.01-cache-2.11-cpan-64827b87656 )