I’m executing a windows process from java and I was bitten by a nasty oversight in one of my project today.
Everything’s been working fine for some time, but today the application I’m calling started spitting out errors to the error stream.
However I’d not been reading the errorstream in my code and it appears to be the culprit for hanging the process execution.
I don’t really care about the error stream or even the inputsteam myself as the thirdparty application does its own logging.
The solution was a follows: I used a SteamGobbler class to purge the input and error streams. Hope this helps someone.
If you’ve been following the changes in the C++11 standard you may have heard of Variadic templates. In layman’s terms: var arg template parameters.
Lets take c# to explain what we’re talking about: Take the Action generic delegate, there’ 16 of them! One overload for each parameter.
However in c++11 we should (when the compiler supports it) be able to use … to indicate that we can have a variable number of type parameters (… I expect comes form java).
The long and the short of it is, they don’t work yet in vs2010 yet
I wonder do they work in VS11? I’ll update this post once I get a chance to fire it up. I’ll also fire up my Linux machine and give the GNU compiler a whirl.
** update: Doesn’t work in VS11 either.