Gio.SubprocessLauncher.set_child_setup

### Method

# Gio SubprocessLauncherset_child_setup

since: 2.40

#### Declaration

    void
    g_subprocess_launcher_set_child_setup (
      GSubprocessLauncher* self,
      GSpawnChildSetupFunc child_setup,
      gpointer user_data,
      GDestroyNotify destroy_notify
    )

#### Description

Sets up a child setup function.

The child setup function will be called after `fork()` but before `exec()` on the child’s side.

`destroy_notify` will not be automatically called on the child’s side of the fork(). It will only be called when the last reference on the `GSubprocessLauncher` is dropped or when a new child setup function is given.

`NULL` can be given as `child_setup` to disable the functionality.

Child setup functions are only available on UNIX.

Available since: 2.40

This method is not directly available to language bindings.

#### Parameters

`child_setup`

  Type: `GSpawnChildSetupFunc`

  A `GSpawnChildSetupFunc` to use as the child setup function.

`user_data`

  Type: `gpointer`

  User data for `child_setup`.

  The argument can be `NULL`.
  The data is owned by the caller of the method.

`destroy_notify`

  Type: `GDestroyNotify`

  A `GDestroyNotify` for `user_data`.