Scripting & runtime · shell
Processes, pipelines & POSIX job control.
The interactive nift shell combines native Nift expressions with direct commands, structured process APIs, pipelines, and real POSIX foreground/background job control.
$ nift
~/project$ make | tee build.log
~/project$ long-task &
[1] running long-task
~/project$ jobs
~/project$ fg 1
^Z
~/project$ bg 1
~/project$ wait 1 On POSIX, each interactive pipeline uses a process group. Foreground jobs receive terminal ownership; Ctrl-C interrupts the foreground group and Ctrl-Z stops it. fg resumes a job in the foreground, bg resumes it in the background, jobs reports stable IDs/states, and wait waits for a job. Terminal ownership and settings are restored before the next prompt.
Append & to launch a background command or pipeline. Structured run() and cmd(...).pipe(...).run() remain synchronous APIs and are separate from interactive job control.
Full process-group and terminal job control is POSIX-specific. Windows supports process execution and structured pipelines but reports interactive jobs/fg/bg/wait as unsupported rather than simulating Unix terminal semantics.