Le samedi 26 février 2005 à 18:32 +1100, Russell Coker a écrit :
open("/proc/self/attr/exec",
O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 3
Perhaps we can consider open("...", O_WRONLY|O_TRUNC, 0666) means :
id=open(..., O_WRONLY, ...) ;
ftruncate=(id,0) ;
write(id,X,0); (?)
In this case, there is something "wrong" at the kernel level.
open("...", O_WRONLY|O_TRUNC, ...) is like writing/changing a file
(except if the file is already empty).