2

I need to remotely install a program on a Linux computer. I do:

./configure
make
make install

However I seem to get issues when I run ./configure (it's a separate problem) where the configuration screen essentially freezes; it doesn't move past a certain check. I need to stop the configuration so I do Ctrl+z, and that lets me use the terminal again.

However, it seems to me the process does not stop. I see the config.log file continue to grow in bytes (gets to be 40+MB). This is a problem since now the process is ongoing and creating this log file that I don't know to what size it will grow to.

I need to reboot the computer in order to stop the configure script now working in the background. I can't see find it's PID when I use the top command to view the processes.

How can I stop ./configure script through the terminal successfully?

  • have you tried running this from tmux or screen (often a good idea when working with a remote connection). – Anthon Sep 27 '16 at 21:04
  • Just do ps, look for configure and type kill PID – Bepsii.sh Jul 23 '18 at 1:55
4

Control+ Z suspends (TSTP/SIGSTOP signal) the most recent foreground process, which returns you back to your shell. From the shell, the bg command sends the suspended process to the background while the fg commands brings it back to foreground. Try Control+C, which sends SIGINT, killing the process. Some software reacts to SIGINT in other ways, like cleaning up before exiting.

  • You may add that you can really kill the command after ctrl-z by typing kill -9 %%. This even works for commands which do not terminate on ctrl-c like less. – rudimeier Sep 27 '16 at 18:55
  • Thank you for your answer. I'm still learning about this, but perhaps because of this certain configuration file, I have tried Control+C but the screen is unresponsive. What I am trying to install is an astronomy program and it is tied to another astronomy software. I have found that I need to type "log out" to stop the script. Just in case, I was wondering, would rebooting the computer the surest way to stop a ./configuration script? I just want to make sure I don't have any ./configuration scripts running in the background. Thank you again. – Guest Sep 27 '16 at 19:05
  • @rudimeier Thank you, that's just what I was wondering right now! I will try it. – Guest Sep 27 '16 at 19:06
  • @Guest: Note that crtl-c or kill without -9 is usually the better way to terminate a process. kill -9 should be used only if the "nice termination" does not work. – rudimeier Sep 27 '16 at 19:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.