core: Extract comm from pipes. #4742

r?