github.com/demonoid81/moby@v0.0.0-20200517203328-62dd8e17c460/pkg/system/umask.go (about)

     1  // +build !windows
     2  
     3  package system // import "github.com/demonoid81/moby/pkg/system"
     4  
     5  import (
     6  	"golang.org/x/sys/unix"
     7  )
     8  
     9  // Umask sets current process's file mode creation mask to newmask
    10  // and returns oldmask.
    11  func Umask(newmask int) (oldmask int, err error) {
    12  	return unix.Umask(newmask), nil
    13  }