spawn_read: terminate output, and it same time, shrink its memory allocation
spawn_read: terminate output, and it same time, shrink its memory allocation

Signed-off-by: Mattias Andrée <3d72f033b30d63e7ff5f0b71398e9c45b66386a1@operamail.com>

maandree/sit,maandree/sit,maandree/sit