I have a code base (mostly C ++) that is well tested and without crashing. Mostly. The part of the code that is irreplaceable, difficult to maintain or improve, and linked to the binary library *, causes all crashes. This does not happen often, but when they do, the whole program crashes.
+----------------------+
| Shiny new sane |
| code base |
| |
| +-----------------+ | If the legacy code crashes,
| | | | the entire program does, too.
| | Legacy Code | |
| | * Crash prone * | |
| | int abc(data) | |
| +-----------------+ |
| |
+----------------------+
Is it possible to extract this part of the code into a separate program, start from the main program, move data between these programs (on Linux, OS X and, if possible, Windows), endure failures in the child process and restart the child? Something like that:
+----------------+
| Shiny new sane | ------.
| code base | |
| | v
| | +-----------------+
| return | | |
| results <-------- | Legacy Code |
+----------------+ | * Crash prone * |
| int abc(data) |
(or not results +-----------------+
because abc crashed)
, int abc(char *data) ( , ). - , . , .
- ++ 11 C, Qt boost. Linux, OSX Windows.
-
*: / , .