Implement hashing in go and add README

This commit is contained in:
David Zuber
2019-09-01 20:43:02 +01:00
parent 8e8907f48b
commit d83cc1b06d
7 changed files with 134 additions and 83 deletions

View File

@ -137,8 +137,8 @@ void pr_check(void) {
while (fgets(buf, 255, f)) {
int read_fields = sscanf(buf, "%s\n", namebuf);
if (read_fields == 1 && namebuf) {
fprintf(stderr, "Demon: %s\n", namebuf);
pid = hash(namebuf);
fprintf(stderr, "Demon: %s, %d\n", namebuf, pid);
demon = true;
add_to_pid_list(pid, namebuf, demon);
}