Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Sending a process to the background
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
numerodix
l33t
l33t


Joined: 18 Jul 2002
Posts: 743
Location: nl.eu

PostPosted: Tue Mar 23, 2004 1:01 am    Post subject: Sending a process to the background Reply with quote

When I start a process in the foreground, then hit ^Z, that should send it to the background, right? Say I run a backup script that gives no output anyway and by mistake I run it in a terminal in the foreground. What I should have done was to append & at the end of that command but it's too late now, what do I do? Well from what I understand it's ctrl+z, sends it to the background, doesn't it? But from my observations, the process always dies shortly thereafter.

What am I doing wrong?
_________________
undvd - ripping dvds should be as simple as unzip
Back to top
View user's profile Send private message
Lajasha
Veteran
Veteran


Joined: 17 Mar 2004
Posts: 1040
Location: Vibe Central

PostPosted: Tue Mar 23, 2004 1:06 am    Post subject: Reply with quote

I think that action pauses the process. The only thing you could do is kill the process and start it the correct way next time.
_________________
Come and play in my land
Back to top
View user's profile Send private message
numerodix
l33t
l33t


Joined: 18 Jul 2002
Posts: 743
Location: nl.eu

PostPosted: Tue Mar 23, 2004 1:26 am    Post subject: Reply with quote

Pause.. well that's still good. How do I resume?
_________________
undvd - ripping dvds should be as simple as unzip
Back to top
View user's profile Send private message
Lajasha
Veteran
Veteran


Joined: 17 Mar 2004
Posts: 1040
Location: Vibe Central

PostPosted: Tue Mar 23, 2004 1:30 am    Post subject: Reply with quote

sorry, to resume you need to use

Code:
fg 'job #'


where job # is the number it gave you when you ctrl+z, if you do not have it just type jobs and it will give you a list.
_________________
Come and play in my land
Back to top
View user's profile Send private message
wimac
n00b
n00b


Joined: 20 Jun 2002
Posts: 28
Location: st. louis, mo

PostPosted: Tue Mar 23, 2004 3:38 am    Post subject: Reply with quote

Well if you want to send a program to the background you can eather launch it with the "&" as an argument,


Code:
# program &



You could also suspend the program by using Ctrl + z then using "bg" to send it to the background.


Code:

# program
ctrl+z
# bg


I think thats it.
_________________
-------------------
\/\/ | /\/\ /\ [
w i m a c

rm -rf /bin/laden
Back to top
View user's profile Send private message
Konsti
l33t
l33t


Joined: 10 Dec 2002
Posts: 691

PostPosted: Tue Mar 23, 2004 10:23 am    Post subject: Reply with quote

Ya, it is the Ctrl+Z AND bg thing 8)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum