import { IOResult } from '../../../../io/types.ts'; import type { DispatchFn } from '../../../../runtime/types.ts'; import { type Redirect } from '../../../../shell/types.ts'; import type { Session } from '../../../session/session.ts'; import type { BuiltinCall, Result } from '../types.ts'; /** The `exec` builtin without redirects: bare `exec` is a no-op that * succeeds; `exec CMD` has no OS-process referent and is refused. */ export declare function handleExecCommand(args: string[], _session: Session): Result; /** * Point the shell's own streams at files for the rest of the shell. `exec * > file` diverts later stdout, `2> file` stderr, `< file` stdin, `>>` * appends; `2>&1`/`>&2` copy one target onto the other; `>&-` closes. * The output file is opened now, as bash opens it at exec time. */ export declare function installExecRedirects(dispatch: DispatchFn, session: Session, redirects: Redirect[]): Promise; /** * Send one statement's output to the shell's `exec` targets: a stream * pointing at a file is appended to it and cleared so it does not also * reach the terminal; a closed stream drops. Returns the stdout that * should still bubble up (null once diverted). */ export declare function divertStatement(dispatch: DispatchFn, session: Session, stdout: Uint8Array | null, io: IOResult): Promise; /** * The `exec` arm. The redirect-only form is intercepted where redirects * are applied; a bare `exec` here has none, and `exec cmd` is the * process-replacement form this refuses. */ export declare function execBuiltin(call: BuiltinCall): Promise; //# sourceMappingURL=exec.d.ts.map