Subject: Re: umask weirdness
To: Sean Doran <smd@ebone.net>
From: jason torubbard <bill@psych.uw.edu.pl>
List: current-users
Date: 06/19/1999 17:12:25
On Sat, 19 Jun 1999, Sean Doran wrote:
>
> Has anyone else noticed their umask being set to 022 after an exec() in
> recent kernels? I see this with the i386 port, and am wondering if it's
> a problem local to me, or if it's simply that nobody's noticed it yet.
>
> I first started noticing this on 8 June thanks to a "make trip" failure
> in the plan9/rc package, and didn't really chase it down hoping it would
> go away after all the recent memory locking fixes etc were in place.
>
> I'm willing to accept that it may be a compilation weirdness, since I
> build with -march=i686 -mfancy-math-387 -O3 and have had USE_EGCS_HAIFA=1
> (and, unrelatedly, I387_LIBM?=yes) in my /etc/mk.conf for ages. On another
> box I use -march=pentium and the other stuff above; it sees the same symptoms.
On my i386 box with kernel compiled only with -O2 optimization the same
symptoms exist.
>
> Anyway, the symptoms are shown off below.
>
> Is this PR-worthy?
>
> Sean.
> - --
> $ ls
> $ umask
> 0022
> $ touch a
> $ ls -l
> total 0
> -rw-r--r-- 1 smd wheel 0 Jun 8 17:35 a
> $ umask 027
> $ touch b
> $ ls -l
> total 0
> -rw-r--r-- 1 smd wheel 0 Jun 8 17:35 a
> -rw-r--r-- 1 smd wheel 0 Jun 8 17:35 b
> $ echo > c
> $ ls -l
> total 1
> -rw-r--r-- 1 smd wheel 0 Jun 8 17:35 a
> -rw-r--r-- 1 smd wheel 0 Jun 8 17:35 b
> -rw-r----- 1 smd wheel 1 Jun 8 17:35 c
> $ dd if=/dev/null of=e
> 0+0 records in
> 0+0 records out
> 0 bytes transferred in 1 secs (0 bytes/sec)
> $ ls -l
> total 1
> -rw-r--r-- 1 smd wheel 0 Jun 8 17:35 a
> -rw-r--r-- 1 smd wheel 0 Jun 8 17:35 b
> -rw-r----- 1 smd wheel 1 Jun 8 17:35 c
> -rw-r--r-- 1 smd wheel 0 Jun 8 17:35 e
> $ umask
> 0027
> $ csh
> smd% umask
> 22
> smd% umask 027
> smd% umask
> 27
> smd% csh
> smd% umask
> 22
>