Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » CDT Makefile Build kills background processes(Make creates background processes that are killed when make returns, but only on some computers)
CDT Makefile Build kills background processes [message #1770842] Thu, 17 August 2017 14:14 Go to next message
Gunter Königsmann is currently offline Gunter KönigsmannFriend
Messages: 1
Registered: August 2017
Junior Member
Dear all,

I have automated a recurring task using make:

  • In the Eclipse project the user double-clicks on the make target named "foo"
  • make sets up and starts the program "foo" which immediately returns, but creates a process that opens the window the user wants to work in
  • on some computer eclipse automatically kill the process that shows the window as soon as "foo" returns. On others the window stays open and the user can work with the window

I assume one of the preference dialogue items is the answer and I assume the answer to be obvious as soon as it has been found. What I can tell is:

  • From cmd.exe a "make foo" returns to the prompt and opens the window fine
  • The whole thing happens on a windows system
  • and the Problem occurs using Eclipse Oxygen.

Can it be that Eclipse opens a windows console and closes it again once it believes that the build process has finished thus killing all processes that have been created during the build?

And how can I avoid the problem?

Thanks in advance,

Gunter.
Re: CDT Makefile Build kills background processes [message #1770888 is a reply to message #1770842] Fri, 18 August 2017 12:24 Go to previous messageGo to next message
Jonah Graham is currently offline Jonah GrahamFriend
Messages: 401
Registered: June 2014
Senior Member
Hi Gunter,

It is not Eclipse that is terminating your background process, but rather make itself quitting. I can't remember the full set of rules of exactly when a sub process is terminated. What you need to do is start the subprocess and have it disconnect from the parent process, including the parent processes stdin/stdout.

I don't have a full answer, but have a look at this Q&A to see if it directs you down the right avenue: https://superuser.com/questions/1069972/windows-run-process-on-background-after-closing-cmd

Jonah
Re: CDT Makefile Build kills background processes [message #1795810 is a reply to message #1770888] Sat, 29 September 2018 10:42 Go to previous message
Andre Zeps is currently offline Andre ZepsFriend
Messages: 2
Registered: September 2018
Junior Member
Hello Eclipse community,

I'm new to this forum and use Eclipse for private and business software development.
Recently I've stumbled upon the same issue Gunter had but on Linux.

I hope it's ok to revive this thread as my problem is exactly the same and there doesn't seems to be a similar related thread.

It's my goal to execute a bash script to stay in background without eclipse wanting to close it.

I've tried setsid, nohup, and &.
It's seems to be impossible to pull this off, without eclipse still wanting to exit the background process.

Greetings
Slamy

Previous Topic:How to create multiplatform library from single chip C project
Next Topic:Compiler not throwing errors when compiling Arduino code in Eclipse
Goto Forum:
  


Current Time: Wed Oct 17 19:14:56 GMT 2018

Powered by FUDForum. Page generated in 0.02234 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top