Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh hangs (3.0.6-pre-2, 3.1.5-pws-16)
- X-seq: zsh-workers 6156
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx>
- To: Tatsuo Furukawa <frkwtto@xxxxxxxxxxxxxxx>, zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: zsh hangs (3.0.6-pre-2, 3.1.5-pws-16)
- Date: Thu, 29 Apr 1999 09:01:22 -0700
- In-reply-to: <199904290549.OAA26192@xxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <199904290549.OAA26192@xxxxxxxxxxxxxxxxxxx>
On Apr 29, 2:28pm, Tatsuo Furukawa wrote:
} Subject: zsh hangs (3.0.6-pre-2, 3.1.5-pws-16)
}
} 1. Write following in .zshrc
}
} RPROMPT="(%l)"
}
} function TRAPWINCH() {
} eval $(resize)
} echo;
} echo "resized";
} echo
} }
}
} 4. Change terminal size using mouse.
}
} Then "resized" message is displayed, and RPROMPT is displayed into
} 'right' place. (But why is "resized" message displayed twice?)
The message is displayed twice because the "resize" command itself causes
a SIGWINCH to be sent. So you get one when xterm finishes remapping, and
another when resize runs. I'm not entirely sure why this doesn't cause
an infinite loop; perhaps resize only sends a SIGWINCH when the values it
reads back from the terminal do not match what's in the environment.
The hang appears to be a race condition in exec.c: getoutput(). Zsh is
blocked forever in sigsuspend() waiting for the SIGCHLD that will tell
it `resize` has exited. Probably that signal arrived while zsh was
handling the SIGWINCH sent by "resize" and zsh either improperly handled
it then or dropped it on the floor.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Messages sorted by:
Reverse Date,
Date,
Thread,
Author