Mac only -wxExecute called with wxEXEC_SYNC returns immediately

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
karanshah
In need of some credit
In need of some credit
Posts: 7
Joined: Tue Dec 02, 2014 6:54 am

Mac only -wxExecute called with wxEXEC_SYNC returns immediately

Post by karanshah »

Hi All,

I am facing a strange issue on Mac, where wxExecute called with wxEXEC_SYNC, but it returns immediately with the return code -1 and the app that was called continues its execution.

It is like, I have called the app asynchronously. But actually, I am using the argument wxEXEC_SYNC.

This is happening only on MAC. The call is made from a bundle to an application.

What could be the issue in this case .?

There are actually a series of apps in this case
app1 -> calls app2 -> calls app3 -> calls app4 -> loads bundle -> calls app5

The issue happens in the phase loads bundle -> calls app5 in the above sequence.

Let me know if you need anything

The code is as follows

long pid = wxExecute(launcherpath, wxEXEC_SYNC)

So, if I put a message box before and after the call

wxMessageBox("Before calling");
long pid = wxExecute(launcherpath, wxEXEC_SYNC)
wxMessageBox("After calling");

And in the Oninit of the app that I call, I have put another message box

wxMessageBox("Oninit");

When I execute this, I get the message
Before calling
After calling


parallely Oninit is called...


Thanks in advance!

Thanks,
Karan
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Mac only -wxExecute called with wxEXEC_SYNC returns immediately

Post by ONEEYEMAN »

Hi,
What version of wx?
What version of OSX?
What is an exact configure line you used?
I presume it is reproducible in the exec sample?

Thankj you.
User avatar
doublemax
Moderator
Moderator
Posts: 19116
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Mac only -wxExecute called with wxEXEC_SYNC returns immediately

Post by doublemax »

Although 7 years old, this seems relevant:
http://trac.wxwidgets.org/ticket/13033#comment:3
Use the source, Luke!
Post Reply