thomasmoelhave / tpie

Templated Portable I/O Environment
Other
112 stars 24 forks source link

Setting file permissions on created files #180

Closed thomasmoelhave closed 9 years ago

thomasmoelhave commented 9 years ago

The POSIX driver sets the file permissions in the open call. This seems to go all the way back to the old stuff in portability.h. Is there a good reason for this behavior (instead of the default umask)? On my system the outcome is that tpie streams created by my process are not group-readable although all the other files created by the process are, that's a little annoying.

Mortal commented 9 years ago

I don't think there is a good reason for that behavior. Obeying umask seems like a sane change to me.

svendcs commented 9 years ago

I agree. I'll take a look at it this week.

svendcs commented 9 years ago

I've changed the POSIX driver so that all files created have permissions set to 0777 & ~umask, i.e. the umask dictates the flags