I have two questions, both are them may be related so I am asking at once. Linux has /proc directory which is runtime data structure and gives information about running process. Does windows have any such directory where I can get runtime info about process, like its layout and open handles. Please do no suggest tools like Process Explorer, its good but they are not part of core windows os.

Secondly, it is said for Windows that not everything is file, like socket is not a file. Does it mean that it is not a sort of file you can see in your hard disk but a runtime it creates file and in proc like data structure it has some entry.

Thanks.

有帮助吗?

解决方案

While Windows has the ability to create virtual files (device drivers use this), there are no such files for process information. Information about processes is available either through the process functions, the undocumented functions used by Process Explorer, or not at all.

Not every file is stored on some disk. Virtual files are essentially just some value in memory, or some callback function that generates the file contents dynamically when you're trying to read it.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top