only one espeakup daemon should be running

This fixes a bug which would allow espeakup in debug mode to be run even
if espeakup was already running as a daemon.
This commit is contained in:
William Hubbs 2009-03-07 10:39:00 -06:00
commit da15136aa7

View file

@ -96,12 +96,13 @@ int main(int argc, char **argv)
/* process command line options */
process_cli(argc, argv);
if (!debug) {
if (espeakup_is_running()) {
printf("Espeakup is already running!\n");
return 1;
}
/* Is the espeakup daemon running? */
if (espeakup_is_running()) {
printf("Espeakup is already running!\n");
return 1;
}
if (!debug) {
/* become a daemon */
daemon(0, 1);