Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run as application not specifying switch -a #7637

Closed
hvlad opened this issue Jun 16, 2023 · 7 comments
Closed

Run as application not specifying switch -a #7637

hvlad opened this issue Jun 16, 2023 · 7 comments

Comments

@hvlad
Copy link
Member

hvlad commented Jun 16, 2023

On Windows Firebird server could run as a service or as an application.
In the latter case command-line switch -a should be supplied, else "nothing happens" from user POV.
Actually, process starts and immediately finishes without notifying. This often confuses new users.

I propose to run Firebird as application if it was started by user (not by SCM) without switch -a.

@hvlad hvlad self-assigned this Jun 16, 2023
@aafemt
Copy link
Contributor

aafemt commented Jun 16, 2023

Because support for Windows XP is dropped, "-a" can be made no-op at all. The only its purpose was to avoid long timeout on StartServiceCtrlDispatcher() call before returning ERROR_FAILED_SERVICE_CONTROLLER_CONNECT which is fixed in modern Windows versions.

@hvlad
Copy link
Member Author

hvlad commented Jun 16, 2023

I don't think we should drop -a switch.

As for

long timeout on StartServiceCtrlDispatcher()

could you point me where it is described ?

@aafemt
Copy link
Contributor

aafemt commented Jun 16, 2023

This is my own experience with dual application implementation years ago (when XP was the only option).

As for "-a" switch: what do you expect it to do when it is used in service command line? It better to do nothing (but of course to be preserved for backward compatibility).

@hvlad
Copy link
Member Author

hvlad commented Jun 16, 2023

This is my own experience with dual application implementation years ago (when XP was the only option).

Do you have such experience with Win7 or Vista ?

As for "-a" switch: what do you expect it to do when it is used in service command line?

To do it, one must create service (or change existing service) manually, not using our instsvc.
Such a person should understand switches and its purposes.
So far, I'm not going to change handling of -a switch, thus it will behave as before (good or bad).

@AlexPeshkoff
Copy link
Member

@hvlad
Is it possible to detect that firebird is started by SCM? If yes may be both switches should become optional.

@hvlad
Copy link
Member Author

hvlad commented Jun 16, 2023

@hvlad Is it possible to detect that firebird is started by SCM?

I know no direct way. I going to handle ERROR_FAILED_SERVICE_CONTROLLER_CONNECT error returned by StartServiceCtrlDispatcher() to run as application, but @aafemt say there could be long delay before return such error - and it bothers me.
On my Win10 I see no such delay. There is no mention of any such delay in docs

If yes may be both switches should become optional.

What both switches ? ;) There is no special switch to run as a service, if you about it.

@aafemt
Copy link
Contributor

aafemt commented Jun 16, 2023

Do you have such experience with Win7 or Vista ?

No. That's why I said that making "-a" switch obsolete is fine because WinXP is not supported anymore and the issue is fixed in later Windows. The delay could happen on WinXP which made "-a" switch useful that time, but since then it has no purpose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants