From: Dan Nelson <dnelson@emsphone.com>
To: Ken Lareau <elessar@deepika.squonk.net>
Cc: zsh-users@math.gatech.edu
Subject: /usr/bin/script annoyance
Date: Wed, 16 Sep 1998 11:08:04 -0500 [thread overview]
Message-ID: <19980916110804.A19057@emsphone.com> (raw)
In-Reply-To: <199809161309.JAA06097@mailhost2.squonk.net>; from "Ken Lareau" on Wed Sep 16 09:09:34 GMT 1998
In the last episode (Sep 16), Ken Lareau said:
> Thanks for the response; however, a more insidious problem has reared
> it's head: both the above and my former method (modified to zsh, of
> course) does not work, since the forking of a subshell doesn't reread
> the startup scripts when 'script' is executed.
>
> I have been unsuccessful in figuring out why this seems to happen, as
> the documentation I've read doesn't give a clue... anyone have any
> ideas on how to get around this little problem?
I've noticed this too. zsh-3.0.5 does not source _any_ startup scripts
inside a 'script' run on the following OS's: FreeBSD 2.2, SCO 5.0.4,
OSF/1 4.0, SunOS 4.1. It _does_ source startup scripts under Linux (RH
4.2).
Oh weird. I just looked at the source to typescript under FreeBSD, and
it reads in part:
char *shell;
shell = getenv("SHELL");
if (shell == NULL)
shell = _PATH_BSHELL;
execl(shell, "sh", "-i", NULL);
So argv[0] is "sh", and it's entering /bin/sh compatibility mode. This
is almost _exactly_ the problem Paul Lew reported to the zsh list on
Aug 11 (mailinglist article archive/latest/4298). Both Bart Schaefer
and zefram posted ugly workarounds :)
I checked the whole FreeBSD source tree, and this is the only place
that exec(zzz, "sh") was called where zzz was not "/bin/sh" or
_PATH_BSHELL. I guess this does count as a /usr/bin/script bug, but
every OS (besides Linux) exhibits the same weird behaviour, and it's
sort of hard to change the SCO, OSF, and SunOs binaries.
-Dan Nelson
dnelson@emsphone.com
next prev parent reply other threads:[~1998-09-16 16:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-09-15 18:47 Simple way to get parent process name? Ken Lareau
1998-09-15 20:13 ` Dan Nelson
1998-09-16 13:09 ` Ken Lareau
1998-09-16 16:08 ` Dan Nelson [this message]
1998-09-16 16:31 ` /usr/bin/script annoyance Ken Lareau
1998-09-16 16:41 ` Dan Nelson
1998-09-16 16:53 ` Ken Lareau
1998-09-16 17:13 ` Ken Lareau
1998-09-16 17:40 ` Bart Schaefer
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=19980916110804.A19057@emsphone.com \
--to=dnelson@emsphone.com \
--cc=elessar@deepika.squonk.net \
--cc=zsh-users@math.gatech.edu \
/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).