After a self-update on Linux, the process running the updated executable would detach itself from the current process (and potentially run in a terminal emulator, although that seemed bugged). This means that it would no longer run under the same parent process. This can create problems if seanime is started as a background process. For example, I have a systemd service file that manages the seanime process. After an update, the new process would be detached and could no longer be controlled via systemctl.
After this change, the current process is replaced with the one running the updated executable and no new process is spawned. This fixes the systemd interaction and should increase compatibility as a whole by removing the hardcoded terminal emulators. It also propagates command line arguments, which didn't happen before.
This could potentially be adapted for the other operating systems, but I don't use those so I didn't investigate further.
After a self-update on Linux, the process running the updated executable would detach itself from the current process (and potentially run in a terminal emulator, although that seemed bugged). This means that it would no longer run under the same parent process. This can create problems if seanime is started as a background process. For example, I have a systemd service file that manages the seanime process. After an update, the new process would be detached and could no longer be controlled via systemctl.
After this change, the current process is replaced with the one running the updated executable and no new process is spawned. This fixes the systemd interaction and should increase compatibility as a whole by removing the hardcoded terminal emulators. It also propagates command line arguments, which didn't happen before.
This could potentially be adapted for the other operating systems, but I don't use those so I didn't investigate further.