Print feature may cause DoS

Thanks for filing an issue! Please answer the questions below so I can help you.

  • iTerm2 version: 3.2.9
  • OS version: MacOS 10.14.3
  • Attach ~/Library/Preferences/com.googlecode.iterm2.plist here (drag-drop from finder into this window)

Detailed steps to reproduce the problem:

  1. This is content of run.sh and run it
#!/bin/bash

if [ -f /tmp/print ]; then
    rm /tmp/print
fi

for i in {1..100}
do
	echo -e "\x1b\x5b\x69" >> /tmp/print
done
  1. use cat command: cat /tmp/print

What happened: The Windows of Print will open. After click the cancel button 100 times or Kill the iTerm2 process(restart it), User can use iTerm2 again.

What should have happened: