mirror of
https://github.com/foo-dogsquared/wiki.git
synced 2025-01-30 22:57:59 +00:00
ed1c78669e
I forgot. I should process more notes starting tomorrow. ;p
702 B
702 B
Oil processes
Oil has an alternative way for managing processes.
The biggest difference is the fork
and forkwait
keyword which are blocks.
fork {
sleep 4
write -- "Hello world"
}
forkwait {
sleep 4
write -- "Hello world 2"
}
fork
is the alternative to the&
operator (e.g.,sleep 6 &
) which can be blocked with thewait
keyword.forkwait
is the proposed alternative for subshells.jobs
views the jobs and processes of the shell.fg
brings a job into the foreground.