I have a problem with my app written in C++.
After I started my app, it run 3 subprocesses. In the activity monitor it looks so: MyApp - process1 - process2 - process3
process1 is a vncserver. If a client connects, the "process1" is now called "MyApp" and a second icon appears in the Dock. I searched out that the icon appears after the function "select(..)" is called. Why happened this?
If I call this at startup of process1 (in a external .mm file)
[NSApplication sharedApplication];
[NSApp setActivationPolicy:NSApplicationActivationPolicyProhibited];
the second icon appears for very short time but disappears immediately. This solves my problem. But now my "process1" (now called "MyApp") is tagged as "not responding" in the activity monitor. The process runs and responds to the client. OSX now thinks my subprocess is a GUI process and tagged it with "not responding". How can I prevent this?
EDIT:
The process "MyApp" starts 3 processes, a vncserver, a ftp client and a ssh client. The ftp and ssh client work fine. But the vncserver changes his process name and shows a second Dock icon. If I disable the icon, the process is tagged as "not responding" but still answers to connected clients.
The user may be confused about the second dock icon or the not responding process and thinks something went wrong.