From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 32646 invoked from network); 2 Aug 2021 18:16:17 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with ESMTPUTF8; 2 Aug 2021 18:16:17 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id 2DF429CA9B; Tue, 3 Aug 2021 04:16:14 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id D8B5C9CA63; Tue, 3 Aug 2021 04:15:50 +1000 (AEST) Authentication-Results: minnie.tuhs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="dAFjKdbx"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id 86E249CA63; Tue, 3 Aug 2021 04:15:47 +1000 (AEST) Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) by minnie.tuhs.org (Postfix) with ESMTPS id CC1509CA60 for ; Tue, 3 Aug 2021 04:15:46 +1000 (AEST) Received: by mail-pj1-f54.google.com with SMTP id m10-20020a17090a34cab0290176b52c60ddso1160751pjf.4 for ; Mon, 02 Aug 2021 11:15:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=JyoR6cxPpFiSA01IcG14707yW7llsUIFJQbIQKQ2kVQ=; b=dAFjKdbxbpnObqUbnEcI3vTU1Wzb2JH+cIHuNKohkyFKEBlQMeUdrNuIjNuf2nE5BC frs9UFKyqWbx4w3MmuxuGHcBJH0dyemeAT/R6MXbD2QSInV3Ep2sWOiMoXKIwz7EDzHP 9ucJw7ukV/CP27MuDpYcZTCPMtboKZqUsdNPZYR3/NgkXxu6GWZMtumiWXjfGF2H4sTm a5TMJ1jrEFgK4kW2Noe5Be3qcD6Vb8Ugs0HnJjFtUEedwIBzRj1dllgYFoN4Aa5Of8Bw jKtViojp6SORpddxs9XIbGXwfF3aVCLeNCqxjw/qKgSMST1bLvrxM89Wcznlv4ev3OUI CMyA== 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:from:date :message-id:subject:to; bh=JyoR6cxPpFiSA01IcG14707yW7llsUIFJQbIQKQ2kVQ=; b=Iuyf5nIvaKf8VsBOjJkpXKKXCDqi2hRx/W/oJzz5fz6bbmhsfOItMADDPOmIxmWpZ3 BEGRJW3tvl1BwrDEHGFf/WWMPQv9NDsMybc+j7bb+gkK2+ZL6Sa94ZwanaYK6KWKYwOH me75snTO8scD38T9mJGZs39Lh8G4e0a9z/1YIeBFC1N9l6/qM4YSsOYWLBFBK3ryVcrq fGGz0CuXhFmbT4DRKLC1uL2R9GLso6lB8Y1485c49pnc4bMiY4fkJQNnND07dEQ5Qr5G VaZIAUn2Zu8TxbLPoZp99DWQmFsf7ArlE93YKa+LtVkeGJskWLMeNLHjC5RqRZw1DZ38 NBdg== X-Gm-Message-State: AOAM533mJnqfcqHybIiWDp/m5Vcfh5gUcdnK26TiXCCSU5x9IScatjCz Cxov753OeZ/tnnyjb7lz/yZMAzyEBkedhyDt7WxCFK2Mzis= X-Google-Smtp-Source: ABdhPJx56QgaQgS9ms4pyMVhFAqiY6szPsO5nXKYYbHbDmRzYFdpAfJhrUAVqHS4RR8TdrwMAJ6g1AQ1acf2ne7V0Aw= X-Received: by 2002:a05:6a00:1712:b029:327:75dd:c8da with SMTP id h18-20020a056a001712b029032775ddc8damr17798923pfc.34.1627928145512; Mon, 02 Aug 2021 11:15:45 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Adam Thornton Date: Mon, 2 Aug 2021 11:15:34 -0700 Message-ID: To: The Eunuchs Hysterical Society Content-Type: multipart/alternative; boundary="000000000000d54dbe05c8978eaf" Subject: Re: [TUHS] Systematic approach to command-line interfaces X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" --000000000000d54dbe05c8978eaf Content-Type: text/plain; charset="UTF-8" It's a measure of Unix having been wounded by its own success. fork() is a great model for a single-threaded text processing pipeline to do automated typesetting. (More generally, anything that is a straightforward composition of filter/transform stages.) Which is, y'know, what Unix is *for*. It's not so great for a responsive GUI in front of a multi-function interactive program. These days, the vast majority of Unix applications are "stuff people play with on their phones." Adam On Mon, Aug 2, 2021 at 7:59 AM Theodore Ts'o wrote: > On Sun, Aug 01, 2021 at 10:42:53PM -0400, Douglas McIlroy wrote: > > > spawn() beats fork()[;] fork() should be deprecated > > > > Spawn is a further complication of exec, which tells what signals and > > file descriptors to inherit in addition to what arguments and > > environment variables to pass. > > > > Fork has a place. For example, Program 1 in > > www.cs.dartmouth.edu/~doug/sieve/sieve.pdf forks like crazy and never > > execs. To use spawn, the program would have to be split in three (or > > be passed a switch setting). > > > > While you may dismiss Program 1 as merely a neat demo, the same idea > > applies in parallelizing code for use in a multiprocessor world. > > It's certainly clear that some kind of primitive is needed to create > new threads. An open question is whether if there exists some kind of > "new thread" primitve plus either spawn(2) or some kind of "create a > child process and then then frob like crazy using 'echo XXX > > /proc//'" whether there still is a need for a > fork(2) system call. > > Obviously, as soon as we start going down this path, we're deviated > quite strongly from the "radical simplicity" of Unix Version 7 that > people have accused modern systems (whether they be Linux or FreeBSD) > of lacking. It's rather interesting that we haven't heard complaints > about how people who dare to try come up with new API's are somehow > traitors to "The Unix Philosphy" that we've seen on other threads. :-) > > - Ted > --000000000000d54dbe05c8978eaf Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
It's a measure of Unix having been wounded by its= own success.

fork() is a great model for a single= -threaded text processing pipeline to do automated typesetting.=C2=A0 (More= generally, anything that is a straightforward composition of filter/transf= orm stages.)=C2=A0 Which is, y'know, what Unix is *for*.
=
It's not so great for a responsive GUI in front of a mul= ti-function interactive program.

These days, the v= ast majority of Unix applications are "stuff people play with on their= phones."

Adam

On Mon, Aug 2, 2021 = at 7:59 AM Theodore Ts'o <tytso@mit= .edu> wrote:
On Sun, Aug 01, 2021 at 10:42:53PM -0400, Douglas McIlroy wrote:
> > spawn() beats fork()[;] fork() should be deprecated
>
> Spawn is a further complication of exec, which tells what signals and<= br> > file descriptors to inherit in addition to what arguments and
> environment variables to pass.
>
> Fork has a place. For example, Program 1 in
> www.cs.dartmouth.edu/~doug/sieve/sieve.pdf= forks like crazy and never
> execs. To use spawn, the program would have to be split in three (or > be passed a switch setting).
>
> While you may dismiss Program 1 as merely a neat demo, the same idea > applies in parallelizing code for use in a multiprocessor world.

It's certainly clear that some kind of primitive is needed to create new threads.=C2=A0 An open question is whether if there exists some kind of=
"new thread" primitve plus either spawn(2) or some kind of "= create a
child process and then then frob like crazy using 'echo XXX >
/proc/<pid>/<magic files>'" whether there still is a n= eed for a
fork(2) system call.

Obviously, as soon as we start going down this path, we're deviated
quite strongly from the "radical simplicity" of Unix Version 7 th= at
people have accused modern systems (whether they be Linux or FreeBSD)
of lacking.=C2=A0 It's rather interesting that we haven't heard com= plaints
about how people who dare to try come up with new API's are somehow
traitors to "The Unix Philosphy" that we've seen on other thr= eads.=C2=A0 :-)

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 - Ted
--000000000000d54dbe05c8978eaf--