# ProcessExecBinding

`import { ProcessExecBinding } from "destack:process/binding";`

Exec binding family.

```ds title="ProcessExecBinding"
export interface ProcessExecBinding {
    exec(command: &'a readonly Path, arguments: &'b readonly [string], environment: &'c readonly [EnvironmentVariable]): Result<void, HostError>;
    execAt(directory: DirectoryHandle, path: &'a readonly Path, arguments: &'b readonly [string], environment: &'c readonly [EnvironmentVariable], flags: ExecFlags): Result<void, HostError>;
    execFile(executable: FileHandle, arguments: &'a readonly [string], environment: &'b readonly [EnvironmentVariable]): Result<void, HostError>;
}
```

[language/library/src/process/binding/exec.ds:13:54](https://github.com/destack-sh/destack/blob/main/language/library/src/process/binding/exec.ds#L13-L54)

## Members

### `exec(command: &'a readonly Path, arguments: &'b readonly [string], environment: &'c readonly [EnvironmentVariable]): Result<void, HostError>`

Replace the current process image with a command path.

### `execAt(directory: DirectoryHandle, path: &'a readonly Path, arguments: &'b readonly [string], environment: &'c readonly [EnvironmentVariable], flags: ExecFlags): Result<void, HostError>`

Replace the current process image using a directory-relative path.

### `execFile(executable: FileHandle, arguments: &'a readonly [string], environment: &'b readonly [EnvironmentVariable]): Result<void, HostError>`

Replace the current process image using an executable file handle.
