WSL2

Simon Peyton Jones simonpj at microsoft.com
Thu Mar 11 12:22:11 UTC 2021


PS: since this is not, apparently, just my stupidity, it would be good to open a ticket and transfer this thread to it.  Would someone like to do that?

|  -----Original Message-----
|  From: ghc-devs <ghc-devs-bounces at haskell.org> On Behalf Of Tom Ellis
|  Sent: 11 March 2021 11:41
|  To: ghc-devs at haskell.org
|  Subject: Re: WSL2
|  
|  On Thu, Mar 11, 2021 at 06:19:46AM -0500, Viktor Dukhovni wrote:
|  > On Thu, Mar 11, 2021 at 06:05:04AM -0500, Viktor Dukhovni wrote:
|  > > So the question is why the lookup is failing.  To that end
|  compiling
|  > > a tracing with "strace" the below C program should tell the story:
|  [...]
|  > To experiment with other group names and make sure that at least
|  group
|  > "root" or similar works, a slightly extended version is:
|  [...]
|  
|  I'm not really following the details, but is this useful to you?
|  
|  % cat g.c && cc g.c -o g && ./g
|  #include <sys/types.h>
|  #include <grp.h>
|  #include <errno.h>
|  #include <stdio.h>
|  
|  int main(int argc, char **argv)
|  {
|      char buf[1024];
|      struct group g, *p;
|      int rc;
|  
|      errno = 0;
|      rc = getgrnam_r(argc > 1 ? argv[1] : "nosuchgrouphere",
|                      &g, buf, sizeof(buf), &p);
|      printf("%s(%p) %m(%d)\n", p ? g.gr_name : NULL, p, errno);
|      return (rc == 0 && p == NULL);
|  }
|  (null)((nil)) No such process(3)
|  _______________________________________________
|  ghc-devs mailing list
|  ghc-devs at haskell.org
|  https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmail.
|  haskell.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fghc-
|  devs&data=04%7C01%7Csimonpj%40microsoft.com%7C48a10ad0766c4dd6caf4
|  08d8e4829c7d%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637510597246
|  441070%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJ
|  BTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=nQdF9H7BpTqQL%2Bm0URWQmXh
|  1KEQAV1KgfPvG75mOR%2B0%3D&reserved=0


More information about the ghc-devs mailing list