Skip to content

Commit

Permalink
servers: start with refcount for opened files
Browse files Browse the repository at this point in the history
  • Loading branch information
jewelcodes committed Nov 28, 2024
1 parent 592aec2 commit d465dcc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/servers/syscalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ void handleSyscallResponse(const SyscallHeader *hdr) {
file = (FileDescriptor *) iod->data;
file->process = p;
file->id = opencmd->id; // unique ID for device files
file->refCount = 1;

strcpy(file->abspath, opencmd->abspath);
strcpy(file->device, opencmd->device);
strcpy(file->path, opencmd->path);
Expand Down

0 comments on commit d465dcc

Please sign in to comment.