Terminal not working, resource unavailable
Your machine definately has too many processes running which is the typical reason for that error message and aligns with Activity monitor. Since you can't restart or shut down, I would have only the following:


quit any / all apps you can and very quickly get a new terminal / shell running. There's small chance you will get a process before the runaway one uses up any freed resources, but you might get lucky: you only need one fork/exec/thread to get a shell. 


If not, you will likely need to try escalating steps like log out of the user session and then back in. (or restart or shut down or pulling the power or holding the power button to disrupt all power and hard halt the machine.)

Maybe sshd is running and you could attempt that or Remote Desktop to connect as a second user if you have both screen sharing and another account set up. Again, it's not likely the system stat will allow new processes, but it's worth trying.

Sorry the  VShildScanner process is misbehaving. This is a case where the "virus software" is worse than the protection it offers. 


https://community.mcafee.com/t5/Mac-and-Linux-Products/Multiple-VShieldScanner-processes/td-p/508106