Open philipstarkey opened 9 years ago
Original comment by Chris Billington (Bitbucket: cbillington, GitHub: chrisjbillington).
Ah, that's silly. I've noticed this on windows 7 too, I think.
The restart behaviour should be changed to be a bit "fresher" than the current method, which replaces the currently running process. It should instead launch a new one. I'll probably make zprocess grow a "restart current process" function to that runs the command that started the current process, after a delay, as a new process, that way the restart behaviour should be the same as the normal-start behaviour.
Original comment by Chris Billington (Bitbucket: cbillington, GitHub: chrisjbillington).
Oh, so it does! I think that changed at some point, I think it used to be os.execv or something, but maybe I'm mistaken.
I can test on Windows at NIST, and try a few things, but if anyone else wants to have a go at this, I'd suspect a few things: One, that the parent process doesn't die before its child process starts - this means there are two BLACS processes running at the same time, although, to be sure, the second one is delayed and so should not be calling the AppID functions until the first one is dead.
You might have some luck settings the DETACHED_PROCESS flag, which I've used for things like launching a zlock server automatically without wanting it to be a child process of the current process (example here). But this would mean that the new process would not inherit the old one's terminal, which would be unfortunate if you are running from a terminal for debugging.
Original report (archived issue) by Chris Billington (Bitbucket: cbillington, GitHub: chrisjbillington).
After compile and restart, BLACS gets grouped together with runamanger in the taskbar in Windows 7.