zsh-workers
 help / color / mirror / code / Atom feed
From: Clint Adams <clint@zsh.org>
To: Philippe Troin <phil@fifi.org>
Cc: zsh-workers@sunsite.dk, 205685@bugs.debian.org
Subject: Re: [vincent@vinc17.org: Re: Bug#205685: clone corruption]
Date: Fri, 30 Jul 2004 12:04:10 -0400	[thread overview]
Message-ID: <20040730160410.GC4059@scowler.net> (raw)
In-Reply-To: <87isc767g9.fsf@ceramic.fifi.org>

> Hope that explains clone better.

Good now?

Index: Doc/Zsh/mod_clone.yo
===================================================================
RCS file: /cvsroot/zsh/zsh/Doc/Zsh/mod_clone.yo,v
retrieving revision 1.1.1.8
diff -u -r1.1.1.8 mod_clone.yo
--- Doc/Zsh/mod_clone.yo	20 Dec 1999 11:24:39 -0000	1.1.1.8
+++ Doc/Zsh/mod_clone.yo	30 Jul 2004 16:02:38 -0000
@@ -16,5 +16,32 @@
 
 The return value of the builtin is zero in both shells if successful,
 and non-zero on error.
+
+The target of tt(clone) should be an unused terminal, such as an unused virtual
+console or a virtual terminal created by
+
+xterm -e sh -c 'trap : INT QUIT TSTP; tty; while :; do sleep 100000000; done'
+
+Some words of explanation are warranted about this long xterm command
+line: when doing clone on a pseudo-terminal, some other session
+("session" meant as a unix session group, or SID) is already owning
+the terminal. Hence the cloned zsh cannot acquire the pseudo-terminal
+as a controlling tty. That means two things:
+
+      the job control signals will go to the sh-started-by-xterm process
+      group (that's why we disable INT QUIT and TSTP with trap; otherwise
+      the while loop could get suspended or killed)
+
+      the cloned shell will have job control disabled, and the job
+      control keys (control-C, control-\ and control-Z) will not work.
+
+This does not apply when cloning to an bf(unused) vc.
+
+Cloning to an used (and unprepared) terminal will result in two
+processes reading simultaneously from the same terminal, with
+input bytes going randomly to either process.
+
+tt(clone) is mostly useful as a shell built-in replacement for
+openvt.
 )
 enditem()


  reply	other threads:[~2004-07-30 16:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-20 18:16 Clint Adams
2004-07-20 18:45 ` Philippe Troin
2004-07-28 15:50   ` Clint Adams
2004-07-28 23:24     ` Philippe Troin
2004-07-30 16:04       ` Clint Adams [this message]
2004-07-30 16:43         ` Philippe Troin

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=20040730160410.GC4059@scowler.net \
    --to=clint@zsh.org \
    --cc=205685@bugs.debian.org \
    --cc=phil@fifi.org \
    --cc=zsh-workers@sunsite.dk \
    /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).