/// <reference types="node" />
/// <reference types="node" />
/// <reference types="node" />
/**
 * Signal Forwarder
 *
 * Shared utility for forwarding process signals to child processes
 * and cleaning up handlers on exit.
 */
import { ChildProcess } from 'child_process';
/**
 * Forward SIGINT, SIGTERM, SIGHUP to a child process.
 * Returns a cleanup function to remove the handlers.
 */
export declare function forwardSignals(child: ChildProcess): () => void;
export type ChildProcessErrorHandler = (err: NodeJS.ErrnoException) => void | Promise<void>;
export type ChildProcessExitHandler = (code: number | null, signal: NodeJS.Signals | null) => void;
/**
 * Attach shared signal-forwarding lifecycle handlers to a child process.
 * Ensures signal listeners are always cleaned up on child exit/error.
 */
export declare function wireChildProcessSignals(child: ChildProcess, onError: ChildProcessErrorHandler, onExit?: ChildProcessExitHandler): void;
//# sourceMappingURL=signal-forwarder.d.ts.map