The simple answer is that you have to do it yourself.
Reliability features are often asked for but it seems that nobody wants to
pay the cost in additional memory, storage space and cpu/wallclock time.
This is for a simple reason:
It is much easier for an application to save all necessary state on disk
than it is for a library or even the operating system to save all
necessary OS, network and buffered I/O state.
--
This signature was intentionally left almost blank.
http://www.this-page-intentionally-left-blank.org/