Attach to a process only when monitor is on