/** * Generic OS/filesystem utilities shared across Dreamux providers and host, * vendored into this leaf package so the provider packages depend on * `@excitedjs/dreamux-types` (+ this package) only and never import * `@excitedjs/dreamux` core. These are platform primitives (process-group * signalling, owner-only dir enforcement, empty-log cleanup, existence probe), * NOT Dreamux host layout/path/socket/log contracts — those are supplied by the * host through the create context and provider options. */ /** True when `pid` names a live process (EPERM counts as alive). */ export declare function isProcessAlive(pid: number): boolean; /** True when a detached process group still exists (EPERM counts as alive). */ export declare function isProcessGroupAlive(pgid: number): boolean; /** Signal an entire process group; only an already-absent group is ignored. */ export declare function killProcessGroup(pgid: number, signal: NodeJS.Signals | number): void; export interface EnsureOwnerOnlyDirOptions { /** Current-user uid probe override (tests). */ getuid?: () => number; } /** * Create/adopt a directory and guarantee the owner-only (0700) privacy * invariant regardless of who created it: reject a symlink leaf, fail loud on a * foreign-uid dir, and tighten any group/other permission bits. */ export declare function ensureOwnerOnlyDir(path: string, options?: EnsureOwnerOnlyDirOptions): Promise; /** * Remove `path` only if it exists and is zero bytes. Best-effort: a missing, * non-empty, or busy file is left untouched and never throws. */ export declare function removeEmptyLogFile(path: string): Promise; /** Best-effort existence probe — the async replacement for `existsSync`. */ export declare function pathExists(path: string): Promise; //# sourceMappingURL=os.d.ts.map