zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: zsh-workers@sunsite.auc.dk
Subject: FPATH/autoload still strange in -dev-21
Date: Wed, 5 Apr 2000 05:09:08 +0000	[thread overview]
Message-ID: <1000405050908.ZM9309@candle.brasslantern.com> (raw)

I just got -dev-21 + patches to 10477 compiled and installed, and I'm still
having the strange problems with exported FPATH and (autoload -U) failing
that I described in 10316.  I examined strace output and discovered that
in the expression:

	if (autoload -U 2> /dev/null); then

First zsh forks the subshell, and then the subshell forks again, apparently
in order to redirect the output of the builtin; but then the subshell exits
for some reason I can't follow, leaving the autoload running as an orphan.
So zsh never sees the exit status of autoload.  (The process forked from
the subshell is plugging away close()ing each of 256 file descriptors, 
except for 0, 1, and 2, most of which are returning EBADF, while its parent
subshell is exiting.)

Now, the odd thing is, the subshell calls _exit(0), so you'd think that zsh
would take the "then" branch of the "if" -- but it doesn't, it takes the
"else" branch.  So there must be two race conditions (?) here -- one in the
subshell where it loses track of its child, and another where the topmost
zsh mishandles the exit of that subshell.

It occurs to me that this could be related to Geoff's report of the "jobs"
command claiming there is a nonexistent job 3.  Why having FPATH in the
environment makes ths happen, I have no idea, but I can reproduce it quite
nicely, so if anyone (Sven?) wants the sample strace output I'd be happy
to provide it.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


             reply	other threads:[~2000-04-05  5:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-04-05  5:09 Bart Schaefer [this message]
2000-04-05  8:03 Sven Wischnowsky
2000-04-06  8:18 Sven Wischnowsky
2000-04-06  9:51 ` Bart Schaefer
2000-04-06 15:56   ` Zefram
2000-04-06 16:42     ` Bart Schaefer
2000-04-06 17:21       ` Zefram
2000-04-06 10:49 Sven Wischnowsky

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=1000405050908.ZM9309@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=zsh-workers@sunsite.auc.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).