-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Fri, Jun 17, 2016 at 01:12:00PM +0000, Andrey wrote:
[...] > well, although it may be not convincing to you: > in Tcl it's return from - > 'open $fname w' > from man open(3tcl): > 'w Open the file for writing only. Truncate it if it exists. If it > does not exist, create a new file.' You don't need to convince me :) -- I just noted that I didn't remember seeing any evidence (which could well have been blindness on my side). [...] But writing a minimal Tcl program and running it through strace might shake out whether they do any fcntl behind the scenes... > how it could be when I tried to save a file from Emacs and got 'Resource > temporarily unavailable' > > well, I included all open(2) errors in your test: > > int nerr[]={EACCES,EEXIST,EFAULT,EFBIG,EINTR,EINVAL,EISDIR,ELOOP, > EMFILE,ENAMETOOLONG,ENODEV,ENOENT,ENOMEM,ENOSPC,ENOTDIR,ENXIO, > EOPNOTSUPP,EOVERFLOW,EPERM,EROFS,ETXTBSY,EWOULDBLOCK}; I see. So still EWOULDBLOCK is the likely "culprit". I see three things you might try: - sift through the kernel sources watching out for a possible EWOULDBLOCK return on open() - have a look at the Emacs sources - use the LD_PRELOAD trick [1] to install a little spy on open() and let the system running for a while like this (the last one depends on the ratio of how critical your system is and how corageous you are ;-) regards [1] https://rafalcieslak.wordpress.com/2013/04/02/dynamic-linker-tricks-using-ld_preload-to-cheat-inject-features-and-investigate-programs/ - -- tomás -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAldj/1MACgkQBcgs9XrR2kYOGQCggYh3j5nex/pHIo5mp1WQ+Vor sysAn2v8YPaeyN6ImvBvWKCg/QAvgSpc =7A6z -----END PGP SIGNATURE-----