OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

iOS 11 and OSG_SYSTEM_SUPPORTED issue

Goto page Previous  1, 2
 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> Submission
View previous topic :: View next topic  
Author Message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 12132

PostPosted: Tue Jan 23, 2018 11:53 am    Post subject:
iOS 11 and OSG_SYSTEM_SUPPORTED issue
Reply with quote

HI Allessandro,

I have used your suggestions as a guide and implemented the follow commit:

https://github.com/openscenegraph/OpenSceneGraph/commit/e49aaa9f2c4c82881394c4699eb3ee530dcaf35d

I tested the code under Linux by modifying it to force the use of
posix_spawn and found I had to add the #include <sys/wait.h>, I don't
know if this will break the Apple build. I have kept the logic for
selecting the feature simple by just testing for __APPLE__ right now.
If this works fine then there is no need to complicate things further.

Could test things out under OSX and iOS and let me know how you get on.

Cheers,
Robert.

The code now is:

#include <osg/os_utils>

extern "C" {

#define USE_POSIX_SPAWN defined(__APPLE__)
//#define USE_POSIX_SPAWN true

#if USE_POSIX_SPAWN

#include <spawn.h>
#include <sys/wait.h>

int osg_system(const char* command)
{
pid_t pid;
posix_spawn(&pid, command, NULL, NULL, NULL, NULL);
return waitpid(pid, NULL, 0);
}

#else // use tranditional C sysmtem call for osg_system implementation

int osg_system(const char* command)
{
return system(command);
}

#endif

}


------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
a.terenzi (Alessandro Terenzi)
Appreciator


Joined: 03 Sep 2009
Posts: 250

PostPosted: Tue Jan 23, 2018 2:35 pm    Post subject:
Reply with quote

Hi Robert,
just tried to build for iOS and everything seems to work fine, I will do more tests later using some apps.

Thanks.
Alessandro
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> Submission All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts osg-users Digest, Vol 136, Issue 8 jonasydy General 0 Wed Oct 10, 2018 12:40 am View latest post
No new posts osg-users Digest, Vol 135, Issue 28 jonasydy General 0 Tue Sep 25, 2018 1:45 am View latest post
No new posts [Crash issue] no error info even set ... pwang General 1 Sun Jul 29, 2018 1:20 pm View latest post
No new posts [Crash issue] How to add&remove d... pwang General 2 Thu Jul 26, 2018 10:10 am View latest post
No new posts Build error under Windows? Need feedb... robertosfield General 3 Wed Jun 27, 2018 11:11 am View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP