Skip to content
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

Replace SIGHUP event with a custom event #234

Merged
merged 1 commit into from
Jul 25, 2016

Conversation

jasonmit
Copy link
Contributor

@jasonmit jasonmit commented Jul 25, 2016

This removes signalling across the process, since SIGHUP will terminate the process if nothing subscribes to this event (only on POSIX).

On non-Windows platforms, the default behavior of SIGHUP is to terminate Node.js, but once a listener has been installed its default behavior will be removed.

So, in the case of ember test nothing is subscribed so it terminates the process after the build completes and before the test run.

Unfortunately, counting listeners also does not work (reliably) since testem uses signal-exit which will make the count 1 when testing. And by default, signal-exit also terminates the process if no others are subscribed.

This change moves off process.emit in place of custom eventing on the addon instance.

Fixes #232

Review with https://github.com/ember-fastboot/ember-cli-fastboot/pull/234/files?w=1 since one file contained a mixture of tabs/spaces and my editor normalized them all to spaces.

/cc @rwjblue

@jasonmit jasonmit force-pushed the remove-sighup branch 2 times, most recently from 08dc48e to 9d4bf2b Compare July 25, 2016 02:26
@jasonmit jasonmit changed the title Removing signally SIGHUP with a custom event Replace SIGHUP event with a custom event Jul 25, 2016
@dustinfarris
Copy link

Confirm that ember test works for me now.

@rwjblue
Copy link
Member

rwjblue commented Jul 25, 2016

This looks good to me.

@tomdale - Can you also review?

@tomdale
Copy link
Contributor

tomdale commented Jul 25, 2016

@rwjblue LGTM

@tomdale tomdale merged commit 5bdcfb6 into ember-fastboot:master Jul 25, 2016
@jasonmit jasonmit deleted the remove-sighup branch July 25, 2016 17:29
@jasonmit
Copy link
Contributor Author

Thanks @rwjblue @tomdale does this warrant a release since peoples builds are breaking?

@rwjblue
Copy link
Member

rwjblue commented Jul 25, 2016

Yes, definitely

xg-wang pushed a commit to xg-wang/ember-cli-fastboot that referenced this pull request Nov 16, 2020
Remove `rsvp` dependency.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants