Not catching segfault when executing command on guest session

Discussions about using Linux guests in VirtualBox.
Post Reply
dboolean
Posts: 1
Joined: 5. Mar 2020, 16:22

Not catching segfault when executing command on guest session

Post by dboolean »

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?
Post Reply