When i launch chromium again when it’s already started , i can see the following:
%> chromium-browser
Created new window in existing browser session.
Is there any general way in C++ to do a similar thing ? Or is it like just “new” function in C++ , simply clone another object ? I’m confused.
It is nothing at all like “new” in C++: it’s at a vastly higher level. When the new process is started, it looks for an existing process, and if it finds one, it sends it a command to create a new window, then exits. The syntax and nature of that command is specific to the application (or application framework), as is the mechanism by which an existing instance is found.