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 message
Jonah Graham is currently offline Jonah GrahamFriend
Messages: 399
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
Previous Topic:Problems with Oxygen and C++11
Next Topic:CDT Remote Debugging/Launching
Goto Forum:
  


Current Time: Sat Dec 16 03:44:54 GMT 2017

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

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