# subprocess

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [connect-full.txt](https://docs.redpanda.com/connect-full.txt)

---
title: subprocess
latest-connect-version: 4.93.0
latest-operator-version: v26.1.4
latest-console-tag: v3.7.3
latest-redpanda-tag: v26.1.9
docname: outputs/subprocess
page-component-name: connect
page-version: master
page-component-version: master
page-component-title: Connect
page-relative-src-path: outputs/subprocess.adoc
page-edit-url: https://github.com/redpanda-data/rp-connect-docs/edit/main/modules/components/pages/outputs/subprocess.adoc
page-git-created-date: "2024-05-24"
page-git-modified-date: "2026-05-26"
---

<!-- Source: https://docs.redpanda.com/connect/components/outputs/subprocess.md -->

**Type:** Output ▼

[Output](https://docs.redpanda.com/connect/components/outputs/subprocess/)[Input](https://docs.redpanda.com/connect/components/inputs/subprocess/)[Processor](https://docs.redpanda.com/connect/components/processors/subprocess/)

**Available in:** Self-Managed

Executes a command, runs it as a subprocess, and writes messages to it over stdin.

```yml
# Config fields, showing default values
output:
  label: ""
  subprocess:
    name: "" # No default (required)
    args: []
    codec: lines
```

Messages are written according to a specified codec. The process is expected to terminate gracefully when stdin is closed.

If the subprocess exits unexpectedly then Redpanda Connect will log anything printed to stderr and will log the exit code, and will attempt to execute the command again until success.

The execution environment of the subprocess is the same as the Redpanda Connect instance, including environment variables and the current working directory.

## [](#fields)Fields

### [](#args)`args[]`

A list of arguments to provide the command.

**Type**: `array`

**Default**: `[]`

### [](#codec)`codec`

The way in which messages should be written to the subprocess.

**Type**: `string`

**Default**: `lines`

**Options**: `lines`

### [](#name)`name`

The command to execute as a subprocess.

**Type**: `string`