Subject RE: [firebird-support] Re: run firebird engine without fbguard
Author Yassir Kozha

 

 

From: firebird-support@yahoogroups.com <firebird-support@yahoogroups.com>
Sent: Monday, July 15, 2019 12:17 PM
To: firebird-support@yahoogroups.com
Subject: *EXT* [firebird-support] Re: run firebird engine without fbguard

 

 

First of all I do not understand initial problem:

 

[Kozha Yassir] In case firebird engine crashed, I don’t want it to be restarted and I need to get the exit code of the firebird engine process.

fbguard don’t restart firebird engine when the option –onetime is given.

 

> The problem with this approach is that when killing the firebird engine process ‘SIGKILL’

 

When firebird server is killed with any signal except 2 & 15 it's restarted by guardian, i.e. guardian does not exit.

 

tro:~/firebird/HEAD/gen/Debug/firebird$ ps ax| grep firebird 6776 ?        S      0:00 /home/alex/firebird/HEAD/gen/Debug/firebird/bin/fbguard -daemon -forever
 6777 ?        Sl     0:00 /home/alex/firebird/HEAD/gen/Debug/firebird/bin/firebird
 6782 pts/18   S+     0:00 grep --color=auto firebird
alex@vostro:~/firebird/HEAD/gen/Debug/firebird$ kill -SIGKILL 6777
alex@vostro:~/firebird/HEAD/gen/Debug/firebird$ ps ax| grep firebird
 6776 ?        S      0:00 /home/alex/firebird/HEAD/gen/Debug/firebird/bin/fbguard -daemon -forever
 6786 ?        Sl     0:00 /home/alex/firebird/HEAD/gen/Debug/firebird/bin/firebird
 6791 pts/18   S+     0:00 grep --color=auto firebird
alex@vostro:~/firebird/HEAD/gen/Debug/firebird$

 

You see - firebird process is restarted,

 

> the fbguard exites with ‘0’. In this case systemd doesn’t get that the firebird process was terminated abnormally.

 

That's abnormal behavior. What is the source of binaries with which you observe it?

 

[Kozha Yassir] It is normal when you start fbguard with –onetime and not –forever. So that the fbguard will not restart firebird engine.

 

What about running firebird server w/o guardian - well, server does not contain code to daemonize itself, i.e. you will have to perform all required for it activity yourself. In other aspects - why not, certainly you can.

[Kozha Yassir] I have tried to run firebird service in systemd unit with type forking. I will try the other types.

 

Thanks.