Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-3951

Refactor/improve libpromises/processes_select.c

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Open
    • Priority: High
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      The code in libpromises/processes_select.c and especially the code working with the static PROCESSTABLE is far from using best practices and best data structures we have. It uses the Item linked list which was created for other things so it uses wrong data types and names for things (e.g. PIDs are stored in the int counter field) and in general a linked list is not the best thing for such data. We should use a (sorted) sequence (Seq) or maybe a hash table (Map) depending on what is the most common way of accessing the data (lookup by PID, process name,...?).

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            vpodzime Vratislav Podzimek
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: