mirror of
https://github.com/RGBCube/serenity
synced 2025-05-24 01:25:07 +00:00
LibSQL: Use kill
to exit forked SQLServer processes to avoid Qt issues
In order to daemonize the SQLServer process for Ladybird, we double-fork
and exit the first child process to ensure the grandchild process is in
a detached state to become SQLServer. After commit c05fcd5
, this happens
after Ladybird's QApplication is created. QApplication seems to hook up
some `exit` handling that makes the call to `exit(0)` here not actually
exit the child process.
Instead, using `kill` with SIGTERM will actually terminate the child
process.
This commit is contained in:
parent
4b8bae8151
commit
78def34c5e
1 changed files with 1 additions and 1 deletions
|
@ -69,7 +69,7 @@ static ErrorOr<void> launch_server(DeprecatedString const& socket_path, Deprecat
|
|||
auto server_pid_file = TRY(Core::Stream::File::open(pid_path, Core::Stream::OpenMode::Write));
|
||||
TRY(server_pid_file->write(DeprecatedString::number(server_pid).bytes()));
|
||||
|
||||
exit(0);
|
||||
TRY(Core::System::kill(getpid(), SIGTERM));
|
||||
}
|
||||
|
||||
server_fd = TRY(Core::System::dup(server_fd));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue