---
name: "pgfind"
section: "9freebsd"
platform: "linux"
package: "freebsd-manpages"
version: "12.2-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/pgfind/9freebsd"
---

# pgfind(9freebsd)

locate a process group by number

## NAME

**pgfind** – locate a process group by number

## SYNOPSIS

**#include \<sys/param.h\>**

**#include \<sys/proc.h\>**

*struct pgrp \**\

**pgfind**(*pid\_t pgid*);

## DESCRIPTION

The **pgfind**() function takes a *pgid* as its argument and returns a pointer to the *pgrp* structure whose *pg\_id* is specified in the argument.

**pgfind**() locks the *pgrp* structure that is returned.

## RETURN VALUES

The **pgfind**() function returns NULL on failure or a pointer to a *pgrp* structure on successful completion.

## SEE ALSO

[pfind(9)](/pfind/9.md)

## AUTHORS

This manual page was written by Evan Sarmiento ⟨*kaworu@sektor7.ath.cx*⟩.
