LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 09-22-2007, 12:40 AM   #1
chrislam
LQ Newbie
 
Registered: Sep 2007
Posts: 5

Rep: Reputation: 0
after using setpgrp or setpgid


after using the setpgrp or setpgid to make a new group
the processes in this group go to the background
how can i take them back to the foreground and run them?
 
Old 09-22-2007, 07:17 AM   #2
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: Debian
Posts: 2,536

Rep: Reputation: 111Reputation: 111
I think by calling tcsetpgrp().
 
Old 09-22-2007, 10:52 PM   #3
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Rep: Reputation: Disabled
By "foreground" do you mean "terminal control"? If so, Hko is correct. Beware, though, that the session leader needs to make the tcsetpgrp call. If the process that wants terminal control places the call, that process will pause with SIGTTOU unless handled or blocked. If it's handled or blocked you will get an error and won't receive control. Do you know how to create a session leader and make sure it controls a terminal?
ta0kira
 
  


Reply



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
kadmind setpgid : Permission denied mesh2005 Linux - Networking 0 12-25-2005 07:22 AM
system logger, single-user, child setpgid errors - Related or Not? coreymc Red Hat 0 04-01-2005 05:17 AM
setpgid() question feetyouwell Programming 5 12-22-2004 01:11 PM
setpgrp() question zaichik Programming 2 12-21-2004 09:22 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:44 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
Open Source Consulting | Domain Registration