From 6747c437b19e162f639259b4d12867d09bbf2ddf Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Fri, 11 May 2018 17:52:07 +0200 Subject: [PATCH] Partially implement fork(2) (#892) * Partially implement fork(2) Really this return ENOSYS (not implemented), which allows sub-processes to detect the condition and continue to run (or crash on their own if they did not expect fork() to fail). * Move sys_fork to correct class; add a basic docstring --- manticore/platforms/linux.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/manticore/platforms/linux.py b/manticore/platforms/linux.py index 4546533..c17f889 100644 --- a/manticore/platforms/linux.py +++ b/manticore/platforms/linux.py @@ -1280,6 +1280,12 @@ class Linux(Platform): return len(data) + def sys_fork(self): + ''' + We don't support forking, but do return a valid error code to client binary. + ''' + return -errno.ENOSYS + def sys_access(self, buf, mode): ''' Checks real user's permissions for a file