mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 19:29:16 +00:00
On Serenity, SQLServer is started by SystemServer. But on Lagom, it is manually started by e.g. Ladybird when the application is started, and killed when the application exits. This means every Ladybird process starts its own SQLServer, which defeats the purpose of SQLServer acting as the single process interacting with the database files. This patch will allow SQLClient to start up a single SQLServer instance, first checking if one already exists. If it does exist, SQLClient will simply connect to SQLServer's socket. If it does not exist, SQLClient will launch SQLServer much like SystemServer would (with a local socket file, etc.). The child SQLServer process is double-forked; the grandchild process becomes the SQLServer process, which the middle child process simply exits to "detach" the grandchild process from the SQLClient process.
1.7 KiB
1.7 KiB