Quiz: You run the Unix or Linux command:
sleep 100 &

What is the most likely state of the sleep process immediately after you press Enter key?
a) Running in the foreground 🏃‍♀️
b) Running in the background 🏃‍♂️
c) Stopped 🛑
d) Zombie 🧟‍♀️

@nixCraft tired, the sleep process is tired and needs some time to deal with your signals later

@nixCraft oh.. er.. i had a script where i needed to use "sleep &" for something, and it worked.. now, if i can remember what the script was, and why i would possibly need to do this.. and why it worked.

i'm gonna go B

@nixCraft don't you know how to create a poll on mastodon?
Yes I know I don't know
29.4%
No, I know that I know
70.6%
Poll ended at .

@nixCraft
It's running in the foreground in its own process
The & means that process is also running in the background
Multitasking is a superpower 💪

Want to know more?
man ps is your friend

@nixCraft it will be ran in background for bunch of cycles then kernel should put it aside for those moreorless 100 sec then run it for another bunch of cycles until it returns.