wxExecute returns wrong return code
|Reported by:||ZenJu||Owned by:|
when trying to execute a commandline synchronously, wxExecute always returns a positive return value (that obviously is caused by a character overflow somewhere...)
Tested with this overload in Ubuntu 2.8.10:
long wxExecute(const wxString& command, int sync = wxEXEC_ASYNC, wxProcess *callback = NULL)
long rv = wxExecute(commandline, wxEXEC_SYNC); //execute command //if commandline starts a program that returns -4, wxExecute returns 252!
Unfortunately my debugger isn't working reliably, so I cannot dive deeper here...
This behavior is really annoying because there is no way to reliably determine an error situation: wxLog messages are not emitted (at least for many invalid commandlines, for a few it actually did emit a useful message) but it returns a positive value like 255, which better be -1 as documented.