This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Re: more new test failures on Darwin


FX,
   Looking at stat_1.f90, another test that fails
under sudo, I believe I see the problem with that test.
The failing line in that test is...

if (s1(6) /= getgid()) call abort

which if I replace with...

if (s1(6) /= getgid()) write(*,*) s1(6), getgid()

...produces the output...

[Jack-Howarths-Computer:~] howarth% sudo ./a.out
         501           0

for the file...

Jack-Howarths-Computer:~] howarth% ls -ln testfile
-rw-r--r--   1 0  501  5 Aug  1 20:49 testfile

compared to the file produced without the sudo...

[Jack-Howarths-Computer:~] howarth% ls -ln testfile
-rw-r--r--   1 501  501  5 Aug  1 20:52 testfile

The problem is that getgid is reporting the gid for
root but s1(6) is reporting the gid for the user that
invoked sudo. Again the file created under sudo has
the owner as root but the group as the user who
invoked sudo.
          Jack


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]