remotely query text file associated with an instance of vi

view full story

http://unix.stackexchange.com – I have opened several text files (a.txt, b.txt, c.txt, ...) in different sessions of vi launched from different instances of a bash shell. Having then accessed that machine remotely, I wish to determine which session of vi is associated with a particular text file (e.g., a.txt) and specifically close that session, preferably while saving the current contents of the buffer (as opposed to executing a process kill). How can these actions be performed? (HowTos)