#!/bin/bash
 exec {safe2}>&2 2>/dev/null {fdevent}< <(
   sh -c 'echo $$; exec inotifywait -mqe CLOSE_WRITE /tmp' 2>&$safe2
   ) 2>&$safe2
 read -u $fdevent pidevent
 trap "$(trap -p EXIT)"$'\n'"kill $pidevent" EXIT
 grep -m1 somevent <&$fdevent
Illustrate a particular case because the own error file descriptor of the process substitution control is not accessible otherwise.
The same exec statement successively save error file descriptor, replace error by /dev/null to be inherited by process substitution, assign a new file descriptor to the process substitution output, and restore the original error file descriptor.
Inside the process substitution itself, the original error file descriptor is made active, but the undesired "process complete" message will be flushed to /dev/null.
Given that, on exit, inotifywait monitor will be silently killed.
However, depending on the process to be killed, SIGPIPE or some signal other than SIGTERM causes a silent exit wihout any effort and reflects a meaningful logic :
 #!/bin/bash
 exec {fdevent}< <(sh -c 'echo $$; exec inotifywait -mqe CLOSE_WRITE /tmp')
 read -u $fdevent pidevent
 ## work with file descriptor, sigpipe exception when done
 kill -PIPE $pidevent