Software :: Forking A Process Into A New Terminal?

Mar 3, 2011

I am trying to create two processes , a parent process and a child process where each of them have their respective CLI. At any point, the user should be able to switch between the CLI of the parent and child processes. I could find three possible approaches to the problem

1) fork the child process into a new terminal

2) activate the CLI of only the process which is currently in the foreground.

3) Write a script (.bashrc triggers this script on login) to start the two processes separately in two different terminals, such that the second process is triggered once the first process reaches a certain stage in execution.

The first approach probably requires the controlling terminal of the child process to be changed. Can this be achieved ? The second approach will require for the process (parent/child) to itself to know everytime it is put in background / foreground so that its CLI operations can be suspended/resumed respectively. Is this possible? Can a script start programs in a new terminal other than the one it is running in?

View 2 Replies


ADVERTISEMENT

General :: About Real UID And Forking?

Feb 13, 2010

I'm thinking of designing a software that may need to change the current user to a normal user if run as root. But from what i've read, you can still switch back to root if you were root in the first place (meaning, the real UID is 0). I'd like to make this impossible. I think the solution is forking but i'd like you to confirm this.

My question is, does the real UID of the children is the effective UID of the parent at the time the fork is done? My manual lists what's inherited from the parent but doesn't states this. I'd like an answer about Linux kernel and about Unices in general (i'd like to make it at least POSIX-portable)

View 2 Replies View Related

Programming :: Use Of Dlopen When Forking Many Similar Processes?

Dec 27, 2010

I am building a queue system (in C on CentOS 5) where each directory queue has a number of process instances 'watching' it. I have a root-permission queue supervisor process which does all the forking, and the instance processes give up root as their first action. For max security each queue is accessible to a different set of users and groups.

I need to keep the RAM requirements as low as possible, so I am relying heavily on copy-on-write (since all memory writes are to shmget() shared memory)

Each process presently dlopen's the libraries it requires after fork, but I'm wondering if I would gain by performing the dlopen before forking a number of instances which all require the same libraries.

Any pointers to mid-level tutorials on dlopen and fork internals would be most appreciated: this is about my third post anywhere since I converted to Linux, but I just can't find the answer to this anywhere online.

View 3 Replies View Related

General :: Attaching A Process To A Terminal?

Dec 13, 2010

I have a file opened in vi running in a terminal(xterm), if I directly closes the terminal without first closing the file then I can see the vi still running in the background(ps x). Now is there any way to attach that process i.e. vi to some other terminal so that I can continue my work on the file. I have also tried fd command but it fails.

View 4 Replies View Related

Ubuntu :: Reattach PTS Or Process To Another Terminal?

Sep 18, 2010

There were a ssh session, but client side crashed and after reconnect, here is still pseudo terminal and process attached to it. Is there any way how to reattach the pts or reattach process to another terminal? (Please ignore screen or another terminal multiplexer, as long as I'm just curios if there is any solution of this situation, cause I use screen).

View 8 Replies View Related

General :: Resume A Process Via Any Terminal?

Jan 23, 2010

(yes a,vim a,copying data etc) via any terminal .please dont give me kill fg,bg at some instances kill -STOP pid,kill -CONT pid .

View 2 Replies View Related

General :: How To Sent Any Pause Process To Any Terminal

Jan 22, 2010

how to send any pause process into running condition from one terminal to other terminal in linux!

View 1 Replies View Related

General :: Transfer Process To Another Terminal?

Sep 12, 2010

How can I send a job running in one bash instance to another? I tried disowning the job, and resuming it with a "fg %cmd" from another terminal, but that doesn't work.

View 3 Replies View Related

Fedora :: Bash Cannot Set Terminal Process Group

Nov 17, 2009

Urgent: on reboot, the Fedora 11 lower bars reach about 70-80%, then I get the message:

/dev/mapper/VolGroup-lv_root: (There are 22 inodes containing multiply-claimed blocks.)
File /home/burnie/.thumbnails/normal/[bunchofhexits].png (inode #15826, mod time Mon Nov 2 04:24:26 2009) has 13 multiply-claimed blocks, shared with 1 file:

[code]....

Just in case this is relevant, yesterday I spent several hours attempting (and failing) to build IcedTea in order to run a Java web service that required it. After the failure occurred, I exited Linux and went to Windows Vista to run the web service, and found that Vista cannot support 64-bit Firefox, so I rebooted to Linux, and ran make clean on the Iced Tea installation, which balked because a stamps directory could not be deleted because it was not empty; I followed this by make distclean which made the same complaint. So I manually deleted the files in the stamps subdirectory, ran make distclean "cleanly", and then rebooted to reach my current very unsatisfactory state.

View 6 Replies View Related

Ubuntu :: Run A Java Process In The Background Of A Terminal ?

Feb 16, 2011

I am running Ubuntu 10.10, and I am trying to run a java process in the background of a terminal, so I can continue to use that terminal.

Other applications will run in the background just fine, but when I run my java application, I cannot change the status of the process from "Stopped" after suspending it.

Here is my command syntax, along with some commands I have tried and their outputs:

There were [1]- entries, but I removed them for simplicity.

View 4 Replies View Related

Ubuntu :: Terminal: Run Programs As Separate Process?

Jul 11, 2011

I want to run programs from Terminal as a separate process, so that for example gedit file

will launch gedit and return to the terminal prompt (so no need to open up another terminal).

View 8 Replies View Related

Fedora :: Error Creating Child Process For This Terminal

Aug 4, 2009

Terminal will not open
Error message: There was an error creating the child process for this terminal
Got this after doing a update to testing repo; to try to fix another issue with my media player sound not working.

Solved
The_Source_HIM
Just add yourself to 'tty' group and relogin

View 5 Replies View Related

OpenSUSE :: KDE Freeze - Cannot Kill Process And Open The Terminal

Jan 3, 2011

first time KDE and OpenSUSE user here, went from BSD to Windows now here with you, and I have a small problem. This is pretty much a fresh install, and KDE will sometimes become unresponsive and the computer will disconnect USB devices (mouse keyboard). Although I can still use the trackpad and keyboard on the laptop, no shortcuts work, I cannot kill process, open the terminal, or anything else, and can only reboot the compute via power switch.

I was told by an experienced Ubuntu user to try to replicate the error on demand and post the logs. The problem is, I can't. It will happen pretty randomly, sometimes when watching flash, or sometimes downloading from Yast2. I did take my last logs from a recent crash though and have the pastbin Jan 3 19:54:02 linux-yiyn su: (to root) kris on / - Linux logfile Also as a side note, although running on older hardware, OpenSUSE never seems to utilize more then 7% CPU (1.5Ghz single core) and 130Mb RAM (2Gb DDR). I am told this is unlike linux systems, that they usually idle high.

System: openSUSE 11.3 (i586)
KDE: 4.4.4 (KDE 4.4.4) "release 3"

View 5 Replies View Related

Ubuntu :: Invoke The Terminal In LINUX When A Process Becomes Unresponsive?

Jan 6, 2010

If a process becomes unresponsive in WINDOWS then we press "alt+ctrl+del" to invoke the task manager & then terminate the process.Is there any similar way to invoke the Linux Terminal so that we can end a process by the 'kill' command when it becomes unresponsive?

View 2 Replies View Related

Ubuntu :: There Was An Error Creating The Child Process Of This Terminal

Feb 13, 2010

I get the error

Code:
there was an error creating the child process of this terminal

When I run this code:

Code:
gnome-terminal --window-with-profile=Scripts

View 2 Replies View Related

Ubuntu :: Start A Non-terminating Process In Terminal Window?

Oct 18, 2010

how to start a process in Ubuntu terminal window that is not killed when the terminal window closes.

View 9 Replies View Related

Ubuntu :: Closing Terminal Kills The Process It Opened

Feb 21, 2011

if i start an application using the terminal.. it gets closed if i close the terminal.. how can i not let this happen?

View 4 Replies View Related

Ubuntu :: Disconnecting From Remote Terminal Without Killing Process?

Apr 9, 2011

I'm running a process on my university's supercomputer that takes several hours to run every time. Is there a command I can use to exit my ssh session without killing the process I'm running?

View 1 Replies View Related

Ubuntu :: Output Data To Running Process In Terminal?

Jul 10, 2011

There is text based game in the Ubuntu repos called gomoku (just 5 in a row) it comes with the package bsdgames. The manual page [URL] lists an option (-b) to run it in the background. I want to try that and if I know how it works create a simple graphical front-end. When I start the program with:

Code:
gomoku -b

it starts and remains active, the terminal does not return to prompt which is OK as the command is not finished. The manual says the program reads from stdin, and this might sound stupid but how to get anything there?

I've tried to pipe an echo command to gomoku which works but ends the program after is receives input.

Code:
echo "black" | gomoku -b

just finishes. After that when you type another command like:

Code:
echo "justsometext" | gomoku -b

gomoku tells it expects either black or white as input. So it forgot the previous "black" because it is a new instance.

How do I pass text to an already running gomoku?

View 2 Replies View Related

Ubuntu :: How To Make New Process Open New Terminal Window

Dec 2, 2010

when I use the fork() function in C it creates a child process but all the output and input is binded to the same terminal as the father process.my question is, how do i make the new process open a new terminal window in linux?

View 2 Replies View Related

General :: Call Or Resume A Paused Process In To Another Terminal?

Jan 13, 2010

how to call or resume a paused process in to another terminal.

View 1 Replies View Related

Fedora :: Ushare Configuration - Last Line Stop Process In The Terminal Via Ctrl+C

May 30, 2009

I just installed ushare on Fedora 10 (yum install ushare is all it took to do), and followed the guidance then to configure sharing for an Xbox 360, [URL] the code below. Notice the last line...due to stopping process in the terminal via Ctrl+C. It appears to me, based on this ending UPNP sharing, that the first line will need to be run each time want to turn on sharing, right? I thought this would simply configure ushare sharing one time, and possibly intiate some sort of file sharing service on each boot, but this appears not to be the case. If I am right, does anyone know how I can develop a script to run at boot to allow ushare to open sharing and keep it open?

[Code]....

View 3 Replies View Related

Ubuntu :: Automatically Run A Process In A Screen Session And Then Detach And Quit Terminal

Jul 24, 2010

There are often times when the best way to launch an application is from the terminal, but it is a graphical application and after it is launched the terminal is useless.

Examples of places where a terminal is convenient are when a process starts lots of child processes and is also unstable; you can be sure to kill all of its children simply by using Ctrl-C at the terminal. Also it allows me to read program output and to set up the terminal environment to be optimal for the application (for example "unset LIBGL_ALWAYS_INDIRECT")

With GNU screen, I can get around the hassle of having a terminal window open by using something like the following in a terminal window:

Code:
screen
my_command
Ctrl-A d

and then I can close the terminal and the program will keep running. Then I just type "screen -r <Tab>" (the tab will get me my screen session if there is only one such session) in any terminal window, even a tty, and I can get the screen session back and use Ctrl-c or something.

So my question is, is there a way to do this automatically so that a launcher or script will start a screen session, inside that screen session start a process, and then detach from that screen session without me having to manually open and close a terminal and type the commands?

View 2 Replies View Related

Ubuntu :: Text Terminal Unreadable - Can't Start Gdm Even After Memorizing The Process Of Logging In And Starting Gdm

Jul 9, 2010

My terminal text is unreadable. Where as the default output would usually fill half the screen it probably fills around 1/20th now. Basically it looks like the text is 1px in size. I was about to install a graphics driver (nvidia) but doh I can't see what I'm typing... I can't start gdm even after memorising the process of logging in and starting gdm (I think gdm is failing to start anyway) I'm using the default xorg.conf provided with the LiveCD;

[Code]....

View 2 Replies View Related

Networking :: Downs Process Speed Reduced / When Open A Terminal Or Run Any Gui Application Its Taking Time?

Jan 19, 2009

if my network downs my system process get slow down ... only in user mode but in root it is working fine ..the process slow especially if i try to open a terminal or run any gui application its taking much time comparing to normal time where network is up ..

View 2 Replies View Related

Ubuntu :: Bash Script - Start A Process Then Close Terminal With In The Script?

Jan 1, 2010

I have got a bash script i have been playing with I need to start a process then close terminal with in the script but leave program running ?

Code:
#!/bin/bash
sudo ifconfig eth0 down
sleep 5
sudo ifconfig eth0 up
firefox & exit

View 9 Replies View Related

Programming :: Detaching A (graphical)process Invoked Without "&" From Terminal?

Jun 6, 2010

If I run a graphical(or any process) process like music player "exaile" from terminal ,Is there a way without using "nohup" or "screen"(terminal multiplexer) to detach "exaile " from the terminal when ran without appending "&" on to exaile(like "exaile &"). If I press CTRL-Z to stop ,some programs errs out , "watch dog time out" and "aborts" the process.

The problem is bg,disown or jobs etc does not list the process if I ran from another terminal. I want to know ways by Which I can detach a graphical/non-graphical process from a terminal as well as to re-attach to the terminal.

View 2 Replies View Related

Red Hat / Fedora :: Command To Stop That File/process Or Is It Just Kill The Process To Stop The Process?

Nov 11, 2010

I've some file with .sh extensions that runs some softwares.Now,how do I stop running that filesI know we run the command ./start_tomcat.sh to start the apache.Is there any command to stop that file/process or is it just kill the process to stop the process

View 2 Replies View Related

General :: Kills A Process Internally Or From Where It Picks File To Continue Its Process?

Jan 8, 2010

one tell me the internal working of kill command. that is how it kills a process internally or from where it picks file to continue its process.

View 3 Replies View Related

General :: Elevate The Priority Of A Process Without Process Superuser Rights?

Jan 21, 2011

I have a high priority service that I start with sudo nice -n -10 process. This process does not need superuser rights though, except for the priority elevation. But nice requires superuser privileges to elevate priority.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved