Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

umask under MSWIN #49

Closed
zdm opened this issue May 16, 2014 · 5 comments
Closed

umask under MSWIN #49

zdm opened this issue May 16, 2014 · 5 comments

Comments

@zdm
Copy link

zdm commented May 16, 2014

From perldoc:

If umask(2) is not implemented on your system and you are trying
to restrict access for *yourself* (i.e., "(EXPR & 0700) > 0"),
raises an exception. If umask(2) is not implemented and you are
not trying to restrict access for yourself, returns "undef".

So, under MSWIN 'undef' is a legal value, not an error, and autodie shouldn't die.

@nthykier
Copy link
Contributor

nthykier commented Oct 4, 2014

I recommend a removal of umask from the list of builtins that autodie protects. @pjf : Comments to this? If not, I will prepare a branch for removing umask as an autodie (and Fatal) protected function.

Rationale: Reading the umask documentation and playing a bit with it, it seems umask always returns a defined value regardless of input on Linux. I suspect the only case it does return undef is on systems without umask (and only in the conditions quoted above from perldoc). If this case is not to be considered a failure, then there is nothing left for autodie/Fatal to do.

@pjf
Copy link
Collaborator

pjf commented Oct 4, 2014

I concur. It sounds like at best autodie does nothing, and at worst it make things worse.

Pinging @rjbs since autodie periodically makes its way into core, but I doubt this would cause any problems.

@nthykier
Copy link
Contributor

nthykier commented Oct 4, 2014

For the record, if we are going to remove umask, we should probably bundle the "kill" (issue #47) and the "fileno" (CPAN RT#75199) as well.

@rjbs
Copy link
Member

rjbs commented Oct 6, 2014

I have no reaction whatsoever to the suggested umask change. So I think it's fine. :)

@nthykier
Copy link
Contributor

nthykier commented Oct 6, 2014

@rjbs: Ok, thanks for commenting. :)
@pjf: Ok, I have made a suggested patch for it in nthykier@859f8de216f634b433d51b190e4230a15d89840f that I will consider merging into master. As mentioned earlier, I think we should bundle this with a fix for issue #47 and "fileno" (CPAN RT#75199). I will look into making patches for those as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants