child_process: handle writeUtf8String error

When handling `writeUtf8String` error, return after emitting it.
Otherwise a runtime failure can occur.

fix #7923
Merge remote-tracking branch 'upstream/v0.10' into v0.10