Very seldom ever seen, this Unix errno ("Resource deadlock avoided") has two major uses. In the kernel, in filesystem code (and maybe VM sometimes...), there can arise deadlock situations which can only be resolved somewhat-gracefully by returning an error, so this is what is returned. POSIX also specifies certain actions in pthreads, such as with mutexes, that will return EDEADLK to prevent the program from hanging.