jsbuild-eclipse
jsbuild-eclipse copied to clipboard
Build Explorer Tasks don't kill process
I'm using the Build Explorer to run the Grunt embedded http server, but using the red square don't kill the process. It is possible to listen to the Process and kill his childs?
You mean that you start grunt task https://www.npmjs.com/package/grunt-http-server
I don't know this task. I have tried to start it with a DOS command and it starts server and it seems that the server stops after? Could you share your project please. Thanks!
Sorry for the late reply! I did not see the notification. Steps to reproduce
- Create a project with yeoman angular generator
yo angular test-app
- Import in Eclipse, converting for Tern project, and using the Grunt module.
- Use the Gruntfile.js in the Build Explorer view
- Run the serve grunt task (Run As > Grunt Task). At this point the browser will open with the index page
- Stop with Eclipse's red square
With that, the node process is still alive, and the port is occupied.
@sergiomichels I don't know yeoman, is it possible to share your project with your github?
@angelozerr Maybe you can use my sample project here. It is generated with yeoman and angular generator https://github.com/jabby/sample-4-angularjs-eclipse
It's not a up-to-date version but I think the problem describe by @sergiomichels will happen.
I have the same issue...
This problem happens when a gulp task which includes, for example, launching development server such as Browser Sync, from "Build Explorer" in Eclipse.
This is sample gulpfile.js:
var gulp = require('gulp');
var bs = require('browser-sync').create();
gulp.task('server', function() {
bs.init({
port: 3000
});
});
The Browser Sync proccess can be killed by "Ctrl-C" when I run this gulp task from CLI such as command prompt in Windows environment. The gulp task "server" is killed at the same time.
But Running this task from "Build Explorer", Eclipse's red square might stop the gulp task, but NEVER kill the Browser Sync proccess...
Thanks @ytkj for your simple sample. It seems that there are a problem with subprocess. Some ideas:
- http://stackoverflow.com/questions/6356340/killing-a-process-using-java
- https://github.com/jerboaa/linuxtools/blob/master/profiling/org.eclipse.linuxtools.profiling.launch/src/org/eclipse/linuxtools/profiling/launch/ProfileLaunchConfigurationDelegate.java
I'm very busy with tern.java. Any contribution are welcome!