Method

GioSubprocessLauncherset_stderr_file_path

since: 2.40

Declaration

void
g_subprocess_launcher_set_stderr_file_path (
  GSubprocessLauncher* self,
  const gchar* path
)

Description

Sets the file path to use as the stderr for spawned processes.

If path is NULL then any previously given path is unset.

The file will be created or truncated when the process is spawned, as would be the case if using ‘2>’ at the shell.

If you want to send both stdout and stderr to the same file then use G_SUBPROCESS_FLAGS_STDERR_MERGE.

You may not set a stderr file path if a stderr fd is already set or if the launcher flags contain any flags directing stderr elsewhere.

This feature is only available on UNIX.

Available since: 2.40

Parameters

path

Type: const gchar*

A filename or NULL.

The argument can be NULL.
The data is owned by the caller of the function.
The value is a file system path, using the OS encoding.