mirror of
https://github.com/linux-speakup/espeakup.git
synced 2026-08-23 16:14:17 +02:00
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:
parent
8dca597f29
commit
da15136aa7
1 changed files with 6 additions and 5 deletions
11
espeakup.c
11
espeakup.c
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue