VFS should associate the table of open files with the client task rather than with one of its phones
Currently, each VFS client is expected to use just one phone for talking to VFS. VFS associates that client's phone with the table of open files belonging to that client. When the phone is hung up, VFS knows it can close all remaining open files and destroy the table.
The problem occurs when the client wants to use multiple phones to talk to VFS. This may be a legitimate requirement on the client side meant to enable the possibility of recursion and parallelism in some IPC protocols.
We should therefore modify VFS's approach to open files so that all phones used by that client to talk to VFS are equal and can manipulate the same set of open files from one table of open files.
The server, i.e. VFS, will have to be able to:
- tell that two connections come from the same client so that it can find the respective table of open files
- count the number of connections from one client to detect when the client hangs up its last phone