Unix C++
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Foreground and Background Processes

Go down

Foreground and Background Processes Empty Foreground and Background Processes

Post by Christopher Wed Mar 10, 2010 11:55 am

To make a process to run in background, use & at the end of command.

Code:
$ sleep 10&

To bring this process to foreground, use 'fg'.

Code:
$ fg

To run a process in foreground, simply run the command.

Code:
$ sleep 10

To send this process to background, first stop this process using 'ctrl+z'. then use 'bg' command. stopped process ll continue in background.

Code:
$ bg
Christopher
Christopher
Admin

Posts : 240
Points : 429
Join date : 2010-02-26
Age : 35

https://unixcpp.forumotion.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum