:: Re: [DNG] What I learned at Distrow…
Etusivu
Poista viesti
Vastaa
Lähettäjä: Ralph Ronnquist
Päiväys:  
Vastaanottaja: dng
Aihe: Re: [DNG] What I learned at Distrowatch
On 14/12 23:31, Hendrik Boom wrote:
> On Sun, Dec 13, 2020 at 09:31:02PM +0100, Didier Kryn wrote:
> > Le 13/12/2020 à 03:15, Steve Litt a écrit :
> > > On Fri, 11 Dec 2020 15:53:35 +0100
> > > Didier Kryn <kryn@???> wrote:
> > >
> > >
> > >>     I don't make it an argument against xdm. Just cheating about your
> > >> own arguments (~:
> > > Didier, why didn't you make that suggestion to me 15 years ago? It's a
> > > brilliant way to guarantee that if somebody logs out of X, they have no
> > > logged in shell to make mischief with.
> > >
> > > I should have thought of that myself. 15 years ago :-).
> > >
> >     Yes you should have. But this is something everybody forgets all the
> > time. We all imagine a program invocation like a function call, in which
> > the caller is suspended until the callee returns; but actually when the
> > shell is suspended waiting the application to return, it intentionnally
> > waits, but can easily stop waiting. The artefact is that we must add an
> > '&' to tell it not to wait in the first place. This is a semantic sugar
> > to make it behave by default "as if" it was a function call.
> >
> >     exec does not create a new process; instead it substitutes the new
> > application to the current one (the shell). I had fun some years ago
> > writing an application which opened an http connection to a server on
> > standard input, read the http header, and then execed another
> > application given in argument.
>
> We Scheme programmers are very aware of this -- it's called tail-calling, and the Scheme
> implementation does this anytime it can.


indeed. And in Forth it's called "next" :)

Ralph.