bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

read + SIGWINCH - strange error


From: Antonio Macchi
Subject: read + SIGWINCH - strange error
Date: Sat, 01 Nov 2008 16:30:20 +0100
User-agent: Thunderbird 2.0.0.12 (X11/20080213)

If I run this script in xterm, and I maximize (not resize) the window, I'll get (nearly always) a very strange error... something like

./test: line 17: wait_for: No record of process 22659

but if I use 'read' without timing or with a very long time ( -t10 ) the error does not raise.


-------

#!/bin/bash

trap trapfunc SIGWINCH

trapfunc ()  {
  for i in {1..1000}; do
    tput cup 0 0
    echo OK
  done
}


clear
echo maximize your window
while true; do
  read -sn1 -t1
done

------





reply via email to

[Prev in Thread] Current Thread [Next in Thread]