LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 05-06-2004, 11:35 PM   #1
apydia
LQ Newbie
 
Registered: May 2004
Posts: 3

Rep: Reputation: 0
Unix Job Control in C [typo fixed]


I'm getting quite frustrated. I need help- and quick.

How do you move a background process to a foreground process? Basically, I am writing a shell. I want to implement built-in job control commands like bash's fg and bg. Can anyone help?

Last edited by apydia; 05-07-2004 at 07:33 AM.
 
Old 05-07-2004, 07:34 AM   #2
apydia
LQ Newbie
 
Registered: May 2004
Posts: 3

Original Poster
Rep: Reputation: 0
bump~
 
Old 05-07-2004, 08:05 AM   #3
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: ubuntu
Posts: 2,530

Rep: Reputation: 108Reputation: 108
This is done by sending these signals to the processes:
SIGSTOP (stop)
SIGTSTP (keyboard stop)
SIGCONT (continue stopped process)

See "man bash" (search for "job control"), "man sigaction" and "man 7 signal" for more info.
 
Old 05-08-2004, 12:29 PM   #4
apydia
LQ Newbie
 
Registered: May 2004
Posts: 3

Original Poster
Rep: Reputation: 0
Issuing these three signals to a background process does nothing. The process simply remains running in the background. I am looking to move a background process to the foreground.
 
  


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
control job turned off greythorne Suse/Novell 0 08-14-2005 03:58 AM
What is the most suitable job for LINUX/Unix my-unix-dream General 9 05-08-2005 09:36 PM
College Degree and UNIX/Linux admin job bru General 9 04-05-2005 07:25 PM
Job control King4lex Linux - Newbie 3 08-16-2004 01:50 PM
Just got a linux/unix job offer! trey85stang General 13 03-19-2004 08:46 PM


All times are GMT -5. The time now is 01:40 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration