---
name: "call_usermodehelper_setup"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/call_usermodehelper_setup"
---

# call\_usermodehelper\_setup(9)

prepare to call a usermode helper

## NAME

call\_usermodehelper\_setup - prepare to call a usermode helper

## SYNOPSIS

**struct subprocess\_info \* call\_usermodehelper\_setup(char \*** *path***, char \*\*** *argv***, char \*\*** *envp***, gfp\_t** *gfp\_mask***, int (\****init***) (struct subprocess\_info \*info, struct cred \*new), void (\****cleanup***) (struct subprocess\_info \*info), void \*** *data***);**

## ARGUMENTS

*path*

path to usermode executable

*argv*

arg vector for process

*envp*

environment for process

*gfp\_mask*

gfp mask for memory allocation

*init*

an init function

*cleanup*

a cleanup function

*data*

arbitrary context sensitive data

## DESCRIPTION

Returns either **NULL** on allocation failure, or a subprocess\_info structure. This should be passed to call\_usermodehelper\_exec to exec the process and free the structure.

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
