On 2016-06-16 21:46 +0600, Andrew P. Cherepenko wrote: > Hello list, > 'open()' for creating file sometimes returns an error: > couldn't open "myfile.txt": resource temporarily unavailable > either in background process or interactively (ex: in Emacs when > trying to save a file).
Are you sure that it's opening the file which fails in that way, and not writing to it? Because, according to the manpages, EAGAIN is a possible error in write(2), but not in open(2). Quoting the write() manpage: ,---- | EAGAIN The file descriptor fd refers to a file other than a socket | and has been marked nonblocking (O_NONBLOCK), and the write | would block. See open(2) for further details on the O_NON‐ | BLOCK flag. `---- > system: Debian 8.5 > with kernel: linux-image-3.16.0-4-amd64 > and systemd 215-17+deb8u4 > > Is that concerned with some imposed limits on the kernel resources ? Probably not. The only limit that should play a role here is the number of file descriptors, and the error would be EMFILE ("Too many open files") rather than EAGAIN. Cheers, Sven