Skip to content

Commit

Permalink
Fix: forks to often when reading same KB in different scripts (#1654)
Browse files Browse the repository at this point in the history
What:
Fix: forks to often when reading same KB in different scripts
Jira: SC-1090

Why:
It fork()s to much

How:
Set values in redis with set_kb_item. Then, read it from different scripts with get_kb_items()

openvas-nasl -X -d set_kb.nasl 1.nasl 2.nasl
  • Loading branch information
jjnicola authored Jun 5, 2024
1 parent 4b949a8 commit d5d919f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nasl/nasl.c
Original file line number Diff line number Diff line change
Expand Up @@ -386,13 +386,13 @@ main (int argc, char **argv)

if (exec_nasl_script (script_infos, mode) < 0)
err++;

if (process_id != getpid ())
exit (0);
}
g_free (script_infos->globals);
g_free (script_infos);

if (process_id != getpid ())
exit (0);

kb_delete (kb);
}

Expand Down

0 comments on commit d5d919f

Please sign in to comment.