Start two winvnc service instances parallel

Developers may discuss here.

Start two winvnc service instances parallel

Postby Thohoj » 2016-07-01 06:59

Hi,

I installed two winvnc services
Code: Select all
winvnc.exe -install uvnc_service_1
winvnc.exe -install uvnc_service_2


What happens is:
uvnc_service_1 starts up, creates its child winvnc process and starts listening. When uvnc_service_2 starts up the child process of uvnc_service_1 stops. After a moment uvnc_service_1 restarts its child process. Then it stops again... and so on.

is it possible to start two service instances parallel?

Regards
Thorsten
Thohoj
 
Posts: 4
Joined: 2016-06-30 08:13

Re: Start two winvnc service instances parallel

Postby Thohoj » 2016-07-03 20:38

In the meantime I was able to find the cause:

service_1 starts up and starts its child (c1) process.
service_2 starts up and starts its child (c2) process.
c2 detects the "don't start me twice" mutex of c1 and shuts itself down.
During shutdown it fires an event that leads into shutdown of c1 which listens on this event.
service_1 detects "something happens to my child c1" and restarts it.
...

1) I renamed the event, so that it includes the "service_name". Now each service has it's own event that fires on shutdown.
2) When the service starts it's child process I inserted the "-multi" argument (from "winvnc.exe -multi -install service_1")
3) The child process detects the "-multi" argument and skips the "don't start me twice" mutex.

The bad news are: I had to change the source.
Thohoj
 
Posts: 4
Joined: 2016-06-30 08:13


Return to Developer discussions (mainly user-mode)

Who is online

Users browsing this forum: No registered users and 3 guests