fdo#82290: avoid pipe deadlock by executing write(2) in a new thread

Change-Id: I65737399d9ac7ffa1eb623f3ff5fffbce6929801

Signed-off-by: Stephan Bergmann <sbergman@redhat.com>