Summary: | openafs doesn't build due to its pinstall.c failing (on /bin/cp) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Michal Maruska <mmc> |
Component: | New packages | Assignee: | Ryan Phillips (RETIRED) <rphillips> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | gullevek |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | patch to src/pinstall/install.c |
Description
Michal Maruska
2003-04-13 10:44:51 UTC
Created attachment 10584 [details, diff]
patch to src/pinstall/install.c
I think the problem is that execve() expects a pointer to a new environment in its second argument, which currently is (char **)0. Using system circumvents this, but (nitpick mode on) intruducing slightly more overhead, because it AFAIK will start a new shell. (nitpick mode of). So I recommend to pass a pointer to a NULL pointer inside the second argument, like execve( "/bin/cp", copy, copy+3 ); . Note that copy+3 will point to a NULL pointer. Unfortunately, I cannot currently submit a patch, the method described works out for me and I'd prefer it to system(). *** Bug 22732 has been marked as a duplicate of this bug. *** 1.3.2 was masked |