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?
I want to kill parent process after "fork()" method. but if I kill parent process with "exit(0)" method, main() thread is terminated as well so child prosess doesn't work anymore. Is there any way to kill only parent process without affecting to child process?
I want to capture PID of a program and kill it using the PID if the program is been executing beyond 5 seconds.The problem I'm facing is I have another copy of the same program running under different shell script, and the above code is killing both the process. How do I specifically kill the program which has started under the current running shell script.
In the comments section of this blog, the commenter "Pratik" claims that you can edit a running bash script, without killing it, and have the changes picked up by the running script. He claims you can do this by editing files in /proc. Now, I know how to find the /proc folder that contains the data on the running process, Code: cd /proc/`pgrep process_name` But I can't figure out what I should do if I want to edit a running bash script.
I was looking into a shell script which had a line "kill -0 [pid]" , I would like to know what the -0 flag does as i found it is not killing the particular [pid] process.
I am trying to kill child process without killing the parent and seem to be having issues doing so. I have tried quite a few different commands and the end result is either killing all of them including the parent or not killing them at all.
I haveing a big problem atm (just after to upgrade to 10.04). I have a simply and easy script that sent a halt command to every KVM virtual machine actually running into the server. this script is/and was) palced as a init-rc script in rc0/rc1 and rc6 lvls. Just after to upgrade, I have noticed that this script is executed but the system ignore the time that it require to finish (giving time to correctly stop a single virtual machine). Aftert 5 second it start sending SIG-TERM and SIGN-KILL to any currect process and then reboot/halt.
I have just done a new script using upstart and I got just the same result. What is happending? why is the waiting the init secuence for a valid/or_not termination of any init script. I am so sorry for this crap english I have never study this language so I try to do my best anytime I speak it (or try ti..).
I'm using 10.04, and gnome-terminal GNOME Terminal 2.30.2 . I have irssi running on screen session on remote host. And I've been struggling for quite many days to configure it to produce either visual feedback or ring terminal's bell when I receive a private message or one of those that are highlighted.
My compiz settings window in General tab has 'Audible bell' checked.
My GNOME terminal has 'Terminal bell' checked.
I also added 'set bell-style audible' to my ~/.inputrc
And I also tried to manually load pcspkr module into my kernel.
No of the above helped or at least I haven't been able to notice any difference.
I also used some commands for irssi to produce bell sign.
Because of my English skills I'll try to explain this subject as best I can, thank you for understanding. Fisrt of all, I am running some program on my slackware in background (using standard method - &). I need to make a script, which allows sending command to this process on my machine from another one. Furthermore this program have to be logged out (standard output f.e. ./myprogram > log.out.txt).It might be a separate Program A which runs my Program B but it cannot be screen, because it is not working like I'd like to and it cannot be java, because it's slow and working not the best so to speak
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).
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.
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?
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.
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?
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.
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.
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?
I'm trying to make a cheap bash script that will log me into a remote terminal. When I run the script, it prompts me for a password. I'd like to include the password entry into the bash script. How do I do this?
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.