Subject: Re: segfault in completion for configure
From: Vincent Lefevre <[email-masked]>
To: [email-masked]
Date: Thu, 17 Mar 2016 16:24:35 +0100
List-Id: Zsh Workers List <zsh-workers.zsh.org>

With:

updprompt()
{
  psvar[2]=""

  unset _trapchld_called
  local njobs jobstr
  njobs=$#jobstates
  [[ $njobs -gt 1 ]] && jobstr="s"
  [[ $njobs -ge 1 ]] && jobstr=" $njobs job$jobstr |"

  echo 1 > /dev/tty

  [[ -n $TTY && $TERM == (xterm*|dtterm|mlterm|rxvt*|screen*) ]] &&
    {
      [[ $TERM == screen* ]] || print -nP "\e]1;%m${ptsn:+[$ptsn]}:%.\x07"
      print -nP "\e]2;${jobstr}${WINTITLE:+ $WINTITLE |} %n@%m - %~ | %y\x07"
    } > /dev/tty

  echo 2 > /dev/tty
}

TRAPCHLD()
{
  echo SIGCHLD 1 > /dev/tty
  if [[ -o interactive && -n $TTY ]] then
    updprompt
    typeset -g _trapchld_called=1
  fi
  echo SIGCHLD 2 > /dev/tty
}

I get after "./configure --[Tab]":

cventin:~/software/mutt/mutt,2> ./configure --SIGCHLD 1
1
2
SIGCHLD 2
zsh: segmentation fault (core dumped)  ~/opt/zsh/bin/zsh

-- 
Vincent Lefèvre <[email-masked]> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)