lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]




On 2017-09-25 03:58 PM, Eric Wing wrote:
On 9/25/17, Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> wrote:
A quick fix is to add this to luaconf.h:

#define system(s) ((s)==NULL ? 0 : -1)

If someone knows the correct defines that identify iOS then this should be
something like:

#if defined(__IOS__)
#define system(s) ((s)==NULL ? 0 : -1)
#endif



iOS has never actually allowed system() or any external process
creation. (Apple's own NSTask was always absent from the SDK.) Up
until now, system() could be linked, but nobody ever dared called it.
Many companies would already remove it to completely avoid the
possibility of Apple rejecting their apps.

And in fact, Android is pretty much the same way. Their engineers say,
"Don't ever do that." The Android process and life-cycle model is
completely alien to this model.

sudo make me a mobile operating system where each app is a whole docker container with even separate ipv6 addresses per app



I recommend that both be disabled in luaconf.h by default. I believe
this is the incantation we need:


#if defined(__APPLE__)
     #include "TargetConditionals.h"
     #if TARGET_OS_IOS || TARGET_OS_WATCH || TARGET_OS_TV
         #define system(s) ((s)==NULL ? 0 : -1)
     #endif // end iOS
#elif defined(__ANDROID__)
     #define system(s) ((s)==NULL ? 0 : -1)

#endif



-Eric


--
Disclaimer: these emails may be made public at any given time, with or without reason. If you don't agree with this, DO NOT REPLY.