-
Notifications
You must be signed in to change notification settings - Fork 357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nospawn + interrupt causes watch to end #377
Comments
Which os and version of node? Also which task is the watch running? Some tasks call |
OSX Mavericks, node 0.10.31. My build chain is pretty long but I'd bet the culprit is mochaTest. Its the longest running so the most likely to be interrupted and I believe it calls exit... The full list is below if you think that's unlikely. rebuild: [ |
Yeah the mocha test runner doesn't play nice with |
Ok, I'll see if I can work around that. Thanks for the help. |
Ok, I've ripped mocha out and I still have problems, so I've tried a number of things including wrapping/rewriting process.exit and pretty much nothing is working. I'd be happy to switch to using spawn:true except there's one thing I can do with spawn:false that I can't with spawned threads, and that's defer web requests to load files until the build finishes. IE, with spawn off, I can tell middleware in grunt-contrib-connect to hold off on fullfilling a request until the build has finished. With spawn on, I don't know when the build has finished because emitting an event in the build emits in a different process. Am I explaining that clearly? So Assuming that resolving this at face value is implausible, how hard would it be to update this project to have an option that takes a function that executes when the watch task starts and another when it finishes in the parent process? IE, something like
|
Not sure if this is related, but I'm seeing the watch abort now whenever there's an error in the task when |
@joewood Try running grunt with |
I use spawn:false and interrupt:true and what I'm seeing happen is that when I save a file, triggering a build, then save again interrupting the first build, that grunt will exit successfully back to the command line after the second build finishes (which obv watch is supposed to keep hanging).
Any ideas why this would happen?
The text was updated successfully, but these errors were encountered: