Quantcast

[patch] parent guardian process exits before fbserver is accepting connections

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[patch] parent guardian process exits before fbserver is accepting connections

Damyan Ivanov-5
Hi,

Attached is a patch that makes the parent guardian process exit to the
OS only after fbserver has called listen() initializing its network
socket.

Without it, the following loop fails (sooner or later):

while true; do sudo service firebird3.0 restart; echo "select 'ready' from rdb\$database;" | isql localhost:employee; sleep 2.1; done

(the sleep is there to avoid the systemd limitation of 5 service
restarts per 10 seconds).

The patch makes the fbserver process send a SIGUSR1 signal to the
parent guardian process, which waits for it before exiting to the OS.

The patch applies (with a bit of fuzz) to master, B3_0_Release and
B2_5_Release branches.

I hope you find it useful. I'll be including the patch in the next
Debian release, after Debian 9 "stretch" is released later this year.

Please tell me if you prefer a ticket in JIRA or pull requests on
github.


Cheers,
    dam

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel

fbserver-startup.patch (1K) Download Attachment
Loading...