Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.