From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id C38F61F4B4 for ; Sun, 27 Dec 2020 19:09:39 +0000 (UTC) Received: from localhost ([::1]:37954 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ktbQA-0003Li-IC for normalperson@yhbt.net; Sun, 27 Dec 2020 14:09:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36230) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ktbQ6-0003LW-Q1 for bug-gnulib@gnu.org; Sun, 27 Dec 2020 14:09:34 -0500 Received: from mail-io1-xd29.google.com ([2607:f8b0:4864:20::d29]:39092) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ktbQ4-0001lZ-QE for bug-gnulib@gnu.org; Sun, 27 Dec 2020 14:09:34 -0500 Received: by mail-io1-xd29.google.com with SMTP id d9so7726624iob.6 for ; Sun, 27 Dec 2020 11:09:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=g+H9I3IrvOIB18a/Y3mF5fwVEahn51ZjZccC5NqNHKs=; b=q80iv5Z3fOLOul+BSTg+RMzpSsDdPlJL9Gp4RPc4yfb8Cm15R5p79D3PMmcZPA9oEW bcF+p4zdNt4UqoplbDyd7qSKtWWyW6jpwpD3RD4MfLDwvXWn8aryrugIsRprS5c3Iuda 4bgW7q++275qqxxu5nqM2SWLnbtlsJcy0HSwYcFTNrcTsL7nAgBUfJB7qPb4WlZQCL7S 2g5GJ52sF+sPzW/F+d1+GMQCcVETJm3MSw1gGrF5FHlMUNwvw2YgcIuFjb7BLfGtAjUc Hyik+3ihNnj2d7F2MFSr4VadWd0XcVTUvwo89WgF54Ro/99OgZ6mkxEVhajeVEAS7HoF P8eA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=g+H9I3IrvOIB18a/Y3mF5fwVEahn51ZjZccC5NqNHKs=; b=mlT/oe6jKauS0K38TPoDqrKBEFqtI5ty1a1dLlU2nEOmKLG3yPNAKytEpu3GDZVCU2 DqV6JQhZmH/u10z+DHfCypFNaicngZxKLnvQjeT2xjv0WVLXISgegH6citnS6K9VbRRt GQu6uae/bAmx2arG22RlKajdibd6Rar7uC9xfPrTWzH2aUWoo+eFQttnpsIkbgl74Ipo GvjKztncrtCsUhT36ZGC8XyRPemmwZ1BiTaEafXKnsnPmWA3idVBK88t1d17rBSuDHzm POJV+KdYh053QlwXgs/BDbKI+MQyycUyMk6H3B8vHA3rNQWmryClkSSOF2A9vcixqavc csKg== X-Gm-Message-State: AOAM531ooQT1W4Udd65Hc8zOzj6KZcQfgZz7z9ctCApXehzl9KnMI9x6 zSFBGcVWDaLpcnxZvMCn59Df58IWcGYHJPYZD8E= X-Google-Smtp-Source: ABdhPJyMdTfQYRuAAXK/nc2s1HjShIQYs9E4caH+ji3Ke+HVieAZcJx8wEpnxnZ0V7D1gk7+ArLCai0i1SA1jpEb+WU= X-Received: by 2002:a02:b02:: with SMTP id 2mr36749512jad.15.1609096171329; Sun, 27 Dec 2020 11:09:31 -0800 (PST) MIME-Version: 1.0 References: <19625603.TXvseGJZxX@omega> <2095420.aIqRkdFbnS@omega> In-Reply-To: <2095420.aIqRkdFbnS@omega> From: Jeffrey Walton Date: Sun, 27 Dec 2020 14:08:59 -0500 Message-ID: Subject: Re: Apple embedded OSes To: Bruno Haible Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2607:f8b0:4864:20::d29; envelope-from=noloader@gmail.com; helo=mail-io1-xd29.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: noloader@gmail.com Cc: "bug-gnulib@gnu.org List" Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" On Sun, Dec 27, 2020 at 7:20 AM Bruno Haible 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 > > 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