#!/bin/bash # Demonstrate correlation between SIGCHLD events # and redir_open EINTR failure on FreeBSD. # https://bugs.gentoo.org/show_bug.cgi?id=447810 for x in {0..10} ; do # Fork some subshells, in order to trigger SIGCHLD events. ( : ) & ( : ) & ( : ) & ( : ) & ( : ) & # Now do a vulnerable redir_open call. while read x ; do echo $x ; done < <(echo $x) done