LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-07-2003, 09:53 AM   #1
markf424
LQ Newbie
 
Registered: Jun 2003
Posts: 2

Rep: Reputation: 0
Question Process management, bg, fg, CNTL-Z


Hello to all.

I am running Slackware 9.0 on a box and have the need to send a process to the background without first suspending it. It maintains live socket connections and when I first suspend the process with ^Z, it loses those connections. Is there a way to accomplish this without first suspending the process? I know I can start by running it in the background, but it requires some interaction from the user prior to my need to send it back.

Another question - is it possible for a process (same one) to be brought to the foreground of another user so that they may manage it? In other words, I have a session where I control this process, I send it to the background, and another user takes control of the process?

Thanks for any help you can give.

Mark
 
Old 06-08-2003, 10:22 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529
Can't you automate/get rid of the user interaction part?

Linux/GNU doesn't allow you to control other UID's processes unless you have root UID privileges. OTOH if you're talking about daemon stuff, then it's possible to let users control some aspects using control/init scripts, preferably using sudo.

Maybe you should elaborate on what you're trying to do.
 
Old 06-08-2003, 09:51 PM   #3
markf424
LQ Newbie
 
Registered: Jun 2003
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks for the reply.

Unfortunately, I can't get rid of the user interaction part because it's essential to the application. It's a trading application which takes order information (share size, profitability requirements, etc) from the user on a dynamic basis. Without the ability to enter these parameters, it becomes fairly useless. The problem is that it maintains live sockets to different quote feeds and if we suspend the process, it loses data on these sockets - not good for a trading app

Occasionally, we have the need to pass the application to another user for monitoring, and it's best for us if we don't have to shut it down. My feeling is that this isn't going to be possible without a rework of how we do things. I guess I'll have to think about it, and of course any suggestions are welcome.

Thanks again.
 
Old 07-24-2003, 05:19 AM   #4
cuicui
LQ Newbie
 
Registered: Jul 2003
Posts: 1

Rep: Reputation: 0
You could try encapsulating your program in a "screen" session.
Screen is session manager for console mode.

A screen session can encapsulate more than one prog, and can be detached (same as "put in background" but without being suspended)
and reattached after. When a screen session is detached, it's similar to a daemon, as you can logout from the system without terminating it.

I also know there i a multiuser support, but i'm not sure you can attach-detach screen session between different user.

More info can be found on

http://www.math.fu-berlin.de/~guckes/screen/

and the documentation

http://www.sunsite.ualberta.ca/Docum...creen_toc.html

Hope it helped

Cuicui
 
  


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
Process Management Utility Rv5 Programming 6 10-18-2004 12:22 AM
Process Management in Linux rjmendez Linux - General 5 08-11-2004 04:05 AM
Some Question on linux process management.. ttianhuat Linux - Newbie 4 01-29-2004 11:35 PM
Process Management Jose Muņiz General 4 10-12-2003 09:14 AM
process management nagna Linux - General 1 11-10-2001 11:00 AM


All times are GMT -5. The time now is 10:56 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