in reply to getcwd failed

I tried system('pwd'), it also fails.
In what way did it fail?
Why and how could this phenomenon happen?

One possible reason is that the current directory was deleted concurrently by another process.