LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-17-2011, 03:20 PM   #1
porphyry5
Member
 
Registered: Jul 2010
Location: oregon usa
Distribution: Slackware 14.1, Arch
Posts: 447

Rep: Reputation: 21
how designate a running app as a job


The "fg", "bg" and "jobs" commands all exist in slackware, and their definition of what a job is, is not simply "any old app that happens to be running", because they all tell me that there are no jobs running on my system.

So how can I get them to recognize a particular app as a "job"?
 
Old 07-17-2011, 03:32 PM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853
Only programs that are running (or suspended) in the background are called jobs, for example when I run a program (here ping with discarded output) and send it to the background/suspend it with Ctrl+z
Code:
tobi@dragon ~ :) % ping google.com > /dev/null
^Z
zsh: suspended  ping google.com > /dev/null
tobi@dragon ~ :( % jobs
[1]  + suspended  ping google.com > /dev/null
tobi@dragon ~ :) % bg
[1]  + continued  ping google.com > /dev/null
tobi@dragon ~ :) % jobs
[1]  + running    ping google.com > /dev/null
This works only for programs started in the same shell and send to background.
 
1 members found this post helpful.
Old 07-17-2011, 05:01 PM   #3
porphyry5
Member
 
Registered: Jul 2010
Location: oregon usa
Distribution: Slackware 14.1, Arch
Posts: 447

Original Poster
Rep: Reputation: 21
Quote:
Originally Posted by TobiSGD View Post
Only programs that are running (or suspended) in the background are called jobs, for example when I run a program (here ping with discarded output) and send it to the background/suspend it with Ctrl+z
This works only for programs started in the same shell and send to background.
Thank you. I'm not sure that I can apply that to my situation, so must experiment a little. I start an app from a script, and would like to be able to shuttle the app between bg and fg so that I can communicate with both through the keyboard.

I guess I'm out of luck. Doing Ctrl-Z in the terminal did not send it to bg, I could still communicate with it with other keystrokes. Then I tried sending Ctrl-Z to it from the script with xdotool, but no better. But thank you for the information.

Last edited by porphyry5; 07-17-2011 at 05:21 PM. Reason: Add more information
 
Old 07-17-2011, 05:12 PM   #4
Mike_M
Member
 
Registered: Mar 2011
Location: California
Distribution: Slackware
Posts: 116

Rep: Reputation: 52
Look at using something like screen for this purpose. man screen for more information.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
C :: Using priorities and malloc() :: Designate Resource Consumption cin_ Programming 10 01-22-2011 05:36 PM
Cron job is not running dhirendrs Programming 1 08-25-2010 05:37 AM
Designate a tty to a regular user? Cyberman Linux - Desktop 2 07-04-2009 08:16 PM
Check if an app is running and if it's not launch this app Coume Linux - General 3 07-28-2008 03:34 AM
remote job running apiav Slackware 4 05-27-2004 09:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration