dup2 doesn’t close fds, it only duplicates them. The old ones weren’t closed, causing problems (like dwl blocking due to the child process never reading from the reading end, even if stdin has been closed).
KSCKJ5QQQNTPEKNJWGPOJYLIURZJUFAHAO5WARKBOTSZMSUXCYRQC