Send create process and fd notification on statedump events
authorAntoine Busque <antoinebusque@gmail.com>
Fri, 3 Apr 2015 21:31:03 +0000 (17:31 -0400)
committerAntoine Busque <antoinebusque@gmail.com>
Fri, 3 Apr 2015 21:31:03 +0000 (17:31 -0400)
linuxautomaton/linuxautomaton/statedump.py

index 55ae77ce4bdfba6414a06cace709dfc66ef23fda..0e6a371a2bedc68b98256a90dde750e299ad4ffe 100644 (file)
@@ -68,6 +68,9 @@ class StatedumpStateProvider(sp.StateProvider):
             # If the thread had opened FDs, they need to be assigned
             # to the parent.
             StatedumpStateProvider._assign_fds_to_parent(proc, parent)
+            self._state.send_notification_cb('create_parent_proc',
+                                             proc=proc,
+                                             parent_proc=parent)
 
     def _process_lttng_statedump_file_descriptor(self, event):
         pid = event['pid']
@@ -85,10 +88,14 @@ class StatedumpStateProvider(sp.StateProvider):
 
         if fd not in proc.fds:
             proc.fds[fd] = sv.FD(fd, filename, sv.FDType.unknown, cloexec)
+            self._state.send_notification_cb('create_fd',
+                                             fd=fd,
+                                             parent_proc=proc)
         else:
             # just fix the filename
             proc.fds[fd].filename = filename
 
+    # FIXME: this is also used in IO Analysis, possibly move
     @staticmethod
     def _assign_fds_to_parent(proc, parent):
         if proc.fds:
This page took 0.025188 seconds and 5 git commands to generate.