Only write a prompt if there is a prompt to write.  The check whether the writing succeeded failed because nothing was written, causing the server to exit prematurely.
Only write a prompt if there is a prompt to write.  The check whether
the writing succeeded failed because nothing was written, causing the
server to exit prematurely.

zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb