Is it worrisome that the Debian distribution comes with a package with this note in the README
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. :)
It also appears /dev/console is overridable, https://github.com/johnath/beep/blob/master/beep.c#L149.