PulseAudio 16.1

Data Fields
pa_spawn_api Struct Reference

A structure for the spawn api. More...

`#include <def.h>`

## Data Fields
void(* | prefork )(void)
| Is called just before the fork in the parent process. More...
void(* | postfork )(void)
| Is called immediately after the fork in the parent process. More...
void(* | atfork )(void)
| Is called immediately after the fork in the child process. More...

## Detailed Description

A structure for the spawn api.

This may be used to integrate auto spawned daemons into your application. For more information see pa_context_connect(). When spawning a new child process the waitpid() is used on the child's PID. The spawn routine will not block or ignore SIGCHLD signals, since this cannot be done in a thread compatible way. You might have to do this in prefork/postfork.

## Field Documentation

## ◆ atfork

void(* pa_spawn_api::atfork) (void)

Is called immediately after the fork in the child process.

May be NULL. It is not safe to close all file descriptors in this function unconditionally, since a UNIX socket (created using socketpair()) is passed to the new process.

## ◆ postfork

void(* pa_spawn_api::postfork) (void)

Is called immediately after the fork in the parent process.

May be NULL.

## ◆ prefork

void(* pa_spawn_api::prefork) (void)

Is called just before the fork in the parent process.

May be NULL.

The documentation for this struct was generated from the following file:

- def.h