mirror of
https://github.com/foo-dogsquared/wiki.git
synced 2025-02-07 12:19:31 +00:00
1 line
3.1 KiB
JSON
1 line
3.1 KiB
JSON
![]() |
{"pageProps":{"metadata":{"date":"2021-08-08 16:02:37 +08:00","date_modified":"2021-08-09 00:17:41 +08:00","language":"en","source":""},"title":"Oil processes","hast":{"type":"root","children":[{"type":"element","tagName":"nav","properties":{"className":"toc"},"children":[{"type":"element","tagName":"ol","properties":{"className":"toc-level toc-level-1"},"children":[]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Oil has an alternative way for managing processes.\n"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The biggest difference is the "},{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"fork"}]},{"type":"text","value":" and "},{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"forkwait"}]},{"type":"text","value":" keyword which are blocks.\n"}]},{"type":"element","tagName":"pre","properties":{"className":["src-block"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-oil"]},"children":[{"type":"text","value":"fork {\n sleep 4\n write -- \"Hello world\"\n}\n\nforkwait {\n sleep 4\n write -- \"Hello world 2\"\n}\n"}]}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"fork"}]},{"type":"text","value":" is the alternative to the "},{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"&"}]},{"type":"text","value":" operator (e.g., "},{"type":"element","tagName":"code","properties":{"className":["inline-code"]},"children":[{"type":"text","value":"sleep 6 &"}]},{"type":"text","value":") which can be blocked with the "},{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"wait"}]},{"type":"text","value":" keyword.\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"forkwait"}]},{"type":"text","value":" is the proposed alternative for subshells.\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"jobs"}]},{"type":"text","value":" views the jobs and processes of the shell.\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"fg"}]},{"type":"text","value":" brings a job into the foreground.\n"}]}]}]}]},"backlinks":[]},"__N_SSG":true}
|