It's occasionally useful to do something like
dtrace -lv -P 'pid$target' -p <target PID> | less
to browse the pid provider probes of the target process. However, quitting less(1) will cause dtrace to receive SIGPIPE and exit, which in turn causes the target process to exit since it's being ptrace(2)ed. It's also conceivably useful to run the output of a dtrace script through a pipe.
This change does two things. First, it installs a handler for SIGPIPE - the same handler that's currently used for SIGQUIT and SIGINT. If a dtrace program is executing, it'll cleanup and exit if it sees SIGPIPE. Second, in list mode (-l), it'll break out of the for-each-probe loop and clean up.