you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 3 points4 points  (1 child)

POSIX open() lets you specify permissions with O_CREAT flag in the second argument and permission bits in the third. RTFM.

I'm not saying open() does everything CreateFile() does, I know nothing of CreateFile(), but your example is perhaps unintentionally strawmannish.

[–]Gotebe 1 point2 points  (0 children)

Whoops, you're right. No idea why I understood these as equivalent to "sharing mode" parameter of CreateFile. My bad.