bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Jeffrey Walton <noloader@gmail.com>
To: Bruno Haible <bruno@clisp.org>
Cc: "bug-gnulib@gnu.org List" <bug-gnulib@gnu.org>
Subject: Re: Apple embedded OSes
Date: Sun, 27 Dec 2020 14:08:59 -0500	[thread overview]
Message-ID: <CAH8yC8nYYEn7uJynMMaMkHGHki3dX+qFtF-bq1qvK7QE=Kv6Bw@mail.gmail.com> (raw)
In-Reply-To: <2095420.aIqRkdFbnS@omega>

On Sun, Dec 27, 2020 at 7:20 AM Bruno Haible <bruno@clisp.org> wrote:
>
> Hi Jeffrey,
>
> > Just an FYI in case you have not hit this wall (yet?)... The exec
> > family, posix_spawn and friends are _not_ available on all Apple
> > platforms. Be sure to check availability before using them.
> >
> > For example, the iPhone/iPad SDKs has them, but the WatchOS and TvOS
> > SDKs lack them. To further complicate matters, you have to include
> > <TargetConditionals.h> before you can check for the SDK.
>
> There are 3 questions:
>
> 1) Do you think it is technically possible to support the iOS variants
>    in Gnulib?

I think Yes, it is technically feasible in most instances.

I think initial support can simply be recognizing the problem
platforms and disabling code paths or returning ENOSYS (not
implemented).

I believe Apple wants folks to use NSTask or NSThread on AppleTV and
AppleWatch. So there is an upgrade path for those who are initiated.

> 2) Do you think it makes sense for the GNU project to support the iOS
>    variants?

Well, I think iOS is one of the most popular platforms, so it would be
wise to try to support it.

Android has about 70% mobile market share, and iOS has about 28%
mobile market share. I don't know the breakdown of iOS variants. But
28% is non-trivial, so I would try to support it.
https://gs.statcounter.com/os-market-share/mobile/worldwide.

iPhone and iPads should cause the least pain because they mostly
behave like you expect. Gnulib and other GNU projects already support
them.

AppleTV and AppleWatch can be more painful because they are crippled.
SOme programs and libraries won't have any problems. For those who are
using a missing function, maybe initial support for them can be a
replacement posix_spawn that simply returns ENOSYS.

> 3) Do you think we need to document that Gnulib doesn't support the iOS
>    variants?

Yes. It is a sharp edge. I imagine developers searching for "Gnulib
posix_spawn iOS" or "Gnulib posix_spawn AppleTV" to see what is going
on when they encounter a compile error.

> My take on these questions would be:
>
> 1) For an OS that does not have files with file names, it's pointless to
>    even think about open(), exec(), and so on.

For AppleTV and AppleWatch, I believe the crippled-ness is limited to
forking a new process. That's why posix_spawn and the exec family are
missing.

I think you will be OK with the other operations, like file or socket ops.

What I have found in practice is, the test suites have the most
trouble because developers fork a server to test something related to
a socket. The libraries and programs ported to AppleTV and AppleWatch
are usually OK.

> 2) Anyone buying and using these devices has surrendered their entire
>    freedom and privacy to Apple. There is no point for GNU to help make
>    these devices more widely spread by porting software to it.

Yeah, I'm not a big fan of Apple either. I stopped joining their
Developer Program years ago when they started forcing people into
their iCloud and wanted folks to indemnify their officers. Buy a
fucking insurance policy if you want indemnification...

I now support Apple platforms to poke Apple in the eye. Anything I can
do to make free software a better alternative is usually a high
priority for me.

> 3) I would think that the communities of POSIX / C users and iOS / Swift
>    users are disjoint. Hence no need to document.

Yeah, I would document it for users. Documentation is cheap.

The groups may be disjoint, but there's no sense in penalizing an iOS
user because of what Apple does. At least let iOS users know there are
technical limitations behind the lack of full support.

Jeff


      reply	other threads:[~2020-12-27 19:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-26 13:53 new modules execve, execvpe, execvp, execv, execl, execle, execlp Bruno Haible
2020-12-27 11:15 ` Jeffrey Walton
2020-12-27 12:19   ` Apple embedded OSes Bruno Haible
2020-12-27 19:08     ` Jeffrey Walton [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH8yC8nYYEn7uJynMMaMkHGHki3dX+qFtF-bq1qvK7QE=Kv6Bw@mail.gmail.com' \
    --to=noloader@gmail.com \
    --cc=bruno@clisp.org \
    --cc=bug-gnulib@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).