MCPcopy Create free account
hub / github.com/F-Stack/f-stack / pdcopy

Function pdcopy

freebsd/kern/kern_descrip.c:2364–2375  ·  view source on GitHub ↗

* Copy a pwddesc structure. */

Source from the content-addressed store, hash-verified

2362 * Copy a pwddesc structure.
2363 */
2364struct pwddesc *
2365pdcopy(struct pwddesc *pdp)
2366{
2367 struct pwddesc *newpdp;
2368
2369 MPASS(pdp != NULL);
2370
2371 newpdp = pdinit(pdp, true);
2372 newpdp->pd_cmask = pdp->pd_cmask;
2373 PWDDESC_XUNLOCK(pdp);
2374 return (newpdp);
2375}
2376
2377/*
2378 * Copies a filedesc structure, while remapping all file descriptors

Callers 2

do_forkFunction · 0.85
pdunshareFunction · 0.85

Calls 1

pdinitFunction · 0.85

Tested by

no test coverage detected