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: 11360

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 osgText::Text display issue (only whi... eskay187 General 5 Tue Dec 26, 2017 1:35 pm View latest post
No new posts OsgText compile issue with the newer ... crubel@compro.net General 6 Wed Nov 15, 2017 7:29 pm View latest post
No new posts setAttribute / Material issue Valzul General 4 Wed Aug 16, 2017 8:15 am View latest post
No new posts memory issue about x-windows in Linux Alberto Luaces General 1 Tue Aug 01, 2017 4:38 pm View latest post
No new posts osgOcean and OpenSceneGraph issue sta... Paradox osgOcean [osgOcean] 0 Tue Jun 20, 2017 10:21 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