-// Execute another program. Returns 0 if there was an error, a PID otherwise.
-WXDLLEXPORT long wxExecute(char **argv, bool sync = FALSE,
+// NB: for backwars compatibility reasons the values of wxEXEC_[A]SYNC *must*
+// be 0 and 1, don't change!
+
+enum
+{
+ // execute the process asynchronously
+ wxEXEC_ASYNC = 0,
+
+ // execute it synchronously, i.e. wait until it finishes
+ wxEXEC_SYNC = 1,
+
+ // under Windows, don't hide the child even if it's IO is redirected (this
+ // is done by default)
+ wxEXEC_NOHIDE = 2,
+
+ // under Unix, if the process is the group leader then killing -pid kills
+ // all children as well as pid
+ wxEXEC_MAKE_GROUP_LEADER = 4
+};
+
+// Execute another program.
+//
+// If flags contain wxEXEC_SYNC, return -1 on failure and the exit code of the
+// process if everything was ok. Otherwise (i.e. if wxEXEC_ASYNC), return 0 on
+// failure and the PID of the launched process if ok.
+WXDLLIMPEXP_BASE long wxExecute(wxChar **argv, int flags = wxEXEC_ASYNC,