Purpose of O_EXEC?



Hi,
What is the purpose of O_EXEC ("open file for execution") flag to
open(2)? Just a hint to the VM system on how to cache the file pages or
is there something else that makes it different from O_RDONLY?

_______________________________________________
freebsd-hackers@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: why swap at all?
    ... > O_STREAMING and a flag to not cache a file when it closes are a good start. ... Win32 API has a FILE_ATTRIBTE_TEMPORARY to mark files which should be ... FILE_FLAG_SEQUENTIAL_SCAN as a hint for the other case where you read the ... There is also a writethrough flag, ...
    (Linux-Kernel)
  • Re: Purpose of O_EXEC?
    ... Just a hint to the VM system on how to cache the file pages or ... this is the only way to open file that has, for instance, mode 0111. ... You can get the filedescriptor pointing to this file, ... Note that fexecveignores the open mode of the ...
    (freebsd-hackers)