bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [chown -R user_id:grpup_id] PROBLEM %CPU=99.7 %MEM=90.3


From: Paul Eggert
Subject: Re: [chown -R user_id:grpup_id] PROBLEM %CPU=99.7 %MEM=90.3
Date: Mon, 03 Oct 2005 13:28:45 -0700
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

I'd guess it is a problem with the getgrnam function.  Does the
following command work for you?  Compile and run it with the same
options that you compiled coreutils.

If it doesn't work, then there's something messed up with your
/etc/group file, or getgrnam implementation.

If it works, but coreutils doesn't, can you investigate why?  Both of
them are trying to access the /etc/group file in the same way, as far
as I can tell.

#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <grp.h>

int
main (void)
{
  struct group *g = getgrnam ("users");
  if (! g)
    abort ();
  printf ("group number = %ld\n", (long int) g->gr_gid);
  endgrent ();
  return 0;
}




reply via email to

[Prev in Thread] Current Thread [Next in Thread]