On *nix systems exec() might be useful to restart, although exec()
preserves open file descriptors and it might be appropriate to close
fd's opened after the original execution started. The situation on
Windows is slightly different, but probably workable. But everything is
more confusing if Maxima has been opened under some socket-based
interface.