nushell / nushell/nushell

Disown a running job

Open
#15,201 1 comment 18 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A:job-control category:enhancement status:needs-triage
Dominant language
Rust
Stars
40.5k
Forks
2.3k
Avg merge
1d 14h
Merged PRs (30d)
79

Description

Related problem

Currently, all jobs are killed when Nushell exits (with a warning before doing so in interactive mode). Since Nushell jobs are threads, it's not easy to simply disown them. We can disown a single external process trivially (#15200), but disowning an internal command job or a pipeline with multiple external commands is much more difficult to achieve cross-platform without the equivalent of fork on Windows.

Describe the solution you'd like

A job disown command:

let id = job spawn { complex | pipeline }
job disown $id
exit

After exiting the main thread, the job should continue running.

Describe alternatives you've considered

Using job dispatch (#15200) or one of the workarounds listed there.

Additional context and details

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no implementation file or test. Start by tracing the existing job spawn behavior and reading related issue #15200; completion means that job disown $id allows internal jobs and multi-command pipelines to continue after Nushell exits across the stated platforms.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.