zsh-users
 help / color / mirror / code / Atom feed
From: "Mark J. Reed" <markjreed@gmail.com>
To: zsh-users@zsh.org
Subject: Re: exec
Date: Mon, 3 Jun 2024 11:33:41 -0400	[thread overview]
Message-ID: <CAA=-s3zo=L7OcEFVhMMdZZgNmrEGOpnNgOh1SgCML2=YPJnYJQ@mail.gmail.com> (raw)
In-Reply-To: <ba16ff3b-8a14-4ab2-b605-bf124129926d@eastlink.ca>

[-- Attachment #1: Type: text/plain, Size: 1806 bytes --]

Your shell is never the only process running on the computer. Certainly not
if you're using a GUI; the terminal emulator is running, to carry what you
type to the shell and what it outputs back to you. The window system is
running, to display what the terminal emulator and other windows have to
say and respond to the keyboard and mouse and so on.  When the shell exits,
the terminal may also (as I said, that's configurable), but there's no
reason for everything else to. You can just fire up another terminal and
keep going, or continue to interact with non-command-line applications like
your web browser.

In X11 setups back in the day, it wasn't uncommon for the *.xinitrc* or
whatever startup file you use to end with something like *exec xterm*, so
if *that particular instance* of *xterm* exited, then the whole window
system went away with it. But that's not typical of modern systems. And
even then the computer wouldn't shut down. You'd just be dropped back at
your original shell on the console, or if you'd also *exec*'ed *xinit*, at
a login prompt.

On Mon, Jun 3, 2024 at 11:23 AM Ray Andrews <rayandrews@eastlink.ca> wrote:

>
>
> On 2024-06-03 07:54, Mark J. Reed wrote:
> >  Exec has the same impact on the shell as exit - shell go bye bye - it
> > just leaves another program in its place.
>
> So I see.  So it's not just a question of a script removing itself from
> memory at the point where control passes, it's 'exit' as we see.  Still,
> the question of who gets control is there -- the computer does not shut
> off.  But again, that question would be there anyway so 'exec' doesn't
> make the question any more difficult.  I guess as far as zsh is
> concerned that's as much as can be said.
>
>
>
>

-- 
Mark J. Reed <markjreed@gmail.com>

[-- Attachment #2: Type: text/html, Size: 2451 bytes --]

  reply	other threads:[~2024-06-03 15:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-03 14:10 exec Ray Andrews
2024-06-03 14:17 ` exec Mark J. Reed
2024-06-03 14:42   ` exec Ray Andrews
2024-06-03 14:50     ` exec Eric Cook
2024-06-03 14:54     ` exec Mark J. Reed
2024-06-03 15:16       ` exec Mark J. Reed
2024-06-03 15:29         ` exec Ray Andrews
2024-06-03 15:22       ` exec Ray Andrews
2024-06-03 15:33         ` Mark J. Reed [this message]
2024-06-03 15:59           ` exec Ray Andrews
2024-06-03 16:06           ` exec Bart Schaefer
2024-06-03 16:23             ` exec Ray Andrews

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

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

  git send-email \
    --in-reply-to='CAA=-s3zo=L7OcEFVhMMdZZgNmrEGOpnNgOh1SgCML2=YPJnYJQ@mail.gmail.com' \
    --to=markjreed@gmail.com \
    --cc=zsh-users@zsh.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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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 NNTP newsgroup(s).