Skip to content

Commit

Permalink
Fix missing installer initialization
Browse files Browse the repository at this point in the history
The current_process field of struct installer was not initialized.
Since the installer instance is static, its default value was 0.

The call to installer_stop() then called kill(0, SIGTERM) (on Linux),
which sent SIGTERM to every process in the process group. In particular,
the scrcpy process was killed.

As a consequence, the last cleanup steps, like disabling "show touches",
were not executed.

Fixes <#183>.
  • Loading branch information
rom1v committed Jun 22, 2018
1 parent 8890750 commit 1a01393
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/src/installer.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ SDL_bool installer_init(struct installer *installer, const char *serial) {
installer->initialized = SDL_FALSE;

installer->stopped = SDL_FALSE;
installer->current_process = PROCESS_NONE;

return SDL_TRUE;
}

Expand Down

0 comments on commit 1a01393

Please sign in to comment.