GFix exit code

37 views
Skip to first unread message

Tommi Prami

unread,
Jul 5, 2024, 2:42:36 AM7/5/24
to firebird-support
Hello,

I ran GFix with following command line

gfix.exe -USER XXXXX -PASSWORD yyyyyy -validate -full "C:\Data\TFB4.FDB"

Returned output of one of my test databases is:

Summary of validation errors
      Number of record level warnings : 1
      Number of database page warnings : 1

Despite of those warnings, gfix returns 0 as exit code.

Is this a bug or by design?

I would expect that if there is something found it would return exit code other than zero?

Thoughts?

-Tee-

Mark Rotteveel

unread,
Jul 5, 2024, 7:25:56 AM7/5/24
to firebird...@googlegroups.com
On 05/07/2024 08:42, Tommi Prami wrote:
> I ran GFix with following command line
>
> gfix.exe -USER XXXXX -PASSWORD yyyyyy -validate -full "C:\Data\TFB4.FDB"
>
> Returned output of one of my test databases is:
>
> Summary of validation errors
>       Number of record level warnings : 1
>       Number of database page warnings : 1
>
>
> Despite of those warnings, *gfix* returns *0* as exit code.
>
> Is this a bug or by design?

But can be true, and are true AFAIK in this case. It is by design, but I
would consider it a bug.

> I would expect that if there is something found it would return exit
> code other than zero?

As far as I'm aware, gfix will never return a non-zero exit code, or
maybe only if something in gfix itself fails, not if the service call
Firebird performs completes and reports validation errors.

Mark
--
Mark Rotteveel

Mark Rotteveel

unread,
Jul 5, 2024, 7:28:44 AM7/5/24
to firebird...@googlegroups.com
On 05/07/2024 13:25, 'Mark Rotteveel' via firebird-support wrote:
> But can be true, and are true AFAIK in this case. It is by design, but I
> would consider it a bug.

I meant to say "Both can be true"...
--
Mark Rotteveel

Tommi Prami

unread,
Jul 5, 2024, 8:08:56 AM7/5/24
to firebird...@googlegroups.com
As I tested, it seems that if I make a mistake with command line parameters, non zero is returned.

If I remember the tests from earlier today... 

Wait a sec, I'll check...

Yes...

gfix.exe -USER XXXXX -PASSWORD YYYY -sweep -parallel 32 "C:\Data\FB4.FDB"

On FB4 which do not support parallel sweep, I think. prints "help" to STDOUT and ExitCode is 1

-Tee-

--
You received this message because you are subscribed to the Google Groups "firebird-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebird-suppo...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/firebird-support/3b7d5e15-d2bd-4278-acd4-bfe6a1350414%40lawinegevaar.nl.
Reply all
Reply to author
Forward
0 new messages