HI Alessandro, You could possible just implement osg::system() using posix_spawn().
Robert. On 19 January 2018 at 10:18, Alessandro Terenzi <[email protected]> wrote: > Hi, > I noticed that if one tries to build for iOS 11 the build fails because, in > the case one wants to deploy only for iOS 11.0 and later the 'system(.)' call > is not available. > > After a search I noticed that many developers suggest to use posix_spawn(.), > so my suggestion is that, instead to just block the building process, we > could allow to use "posix_spawn(.)" if the OSG_SYSTEM_SUPPORTED is not > defined AND if we are not building for WIN32 (for which, to my understanding, > "posix_spawn(.)" is not available, and anyway, I think for WIN32 'system(.)' > should be always available, right?) > > The affected files would be: > > include/osg/osg_utils > src/osgPlugins/lua/lua-5.2.3/src/loslib.c > > My idea would be to use: > > > Code: > pid_t pid; > posix_spawn(&pid, cmd, NULL, NULL, NULL, NULL); > int stat = waitpid(pid, NULL, 0); > > > > instead of: > > > Code: > int stat = system(cmd) > > > > What do you think? > > Cheers, > Alessandro > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=72790#72790 > > > > > > _______________________________________________ > osg-submissions mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
