See https://github.com/antirez/linenoise for details. Implemented a routine atexit() in libc. Pdc modified to use readline library.
imported from https://github.com/daniel-thompson/pdc repository.