I am currently working on a python script that uses vboxapi to communicate with a Linux CentOS VM (Python 3.8.1, VirtualBox 6.0.16, Guest Additions 5.1.30-2017). I am trying to catch a segmentation fault from a process that is being run on a Guest Session. The process runs a shell script, that opens a compiled C++ file, that access invalid memory purposefully to create a segfault. However, I am not able to return any information about the process when it runs. I can certainly set a timeout, which properly terminates the task, but I am looking for a solution that would able to let me know if a program caused a segfault. If I don't set a timeout, my python code hangs indefinitely.
Is there a way to report back information about a potential segfault caused by a guestSession process?