---
name: "call_usermodehelper_setfns"
section: "9"
platform: "linux"
package: "linux-manual-3.2"
version: "3.2.78-1"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/call_usermodehelper_setfns"
---

# call\_usermodehelper\_setfns(9)

set a cleanup/init function

## NAME

call\_usermodehelper\_setfns - set a cleanup/init function

## SYNOPSIS

**void call\_usermodehelper\_setfns(struct subprocess\_info \*** *info***, int (\****init***) (struct subprocess\_info \*info, struct cred \*new), void (\****cleanup***) (struct subprocess\_info \*info), void \*** *data***);**

## ARGUMENTS

*info*

a subprocess\_info returned by call\_usermodehelper\_setup

*init*

an init function

*cleanup*

a cleanup function

*data*

arbitrary context sensitive data

## DESCRIPTION

The init function is used to customize the helper process prior to exec. A non-zero return code causes the process to error out, exit, and return the failure to the calling process

The cleanup function is just before ethe subprocess\_info is about to be freed. This can be used for freeing the argv and envp. The Function must be runnable in either a process context or the context in which call\_usermodehelper\_exec is called.

## COPYRIGHT
