mirror of
https://github.com/RGBCube/serenity
synced 2025-05-25 22:35:07 +00:00
Shell: Make Job constructors private and use a create() helper
Also store PGIDs as pid_t since that's what they are.
This commit is contained in:
parent
bf2cd9374c
commit
5bce0193de
2 changed files with 14 additions and 16 deletions
|
@ -572,7 +572,7 @@ RefPtr<Job> Shell::run_command(const AST::Command& command)
|
|||
StringBuilder cmd;
|
||||
cmd.join(" ", command.argv);
|
||||
|
||||
auto job = adopt(*new Job(child, (unsigned)child, cmd.build(), find_last_job_id() + 1));
|
||||
auto job = Job::create(child, (unsigned)child, cmd.build(), find_last_job_id() + 1);
|
||||
jobs.set((u64)child, job);
|
||||
|
||||
job->on_exit = [](auto job) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue