Skip to content

Conversation

@johnmccutchan
Copy link
Contributor

  • Remove --control-pipe command option and related code. Reading from a named pipe via dart:io is unreliable today.
  • Add --pid-file option which writes the pid of flutter run into a file.
  • Wired up SIGUSR1 to hot reload
  • Wired up SIGUSR2 to full restart

@johnmccutchan
Copy link
Contributor Author

@Hixie @HansMuller

@johnmccutchan
Copy link
Contributor Author

Expected usage:

$ flutter run --hot --pid-file=/tmp/flutter.run.pid

To trigger a hot reload from another process:

$ kill -USR1 `cat /tmp/flutter.run.pid`

To trigger a restart from another process:

$ kill -USR2 `cat /tmp/flutter.run.pid`

@HansMuller
Copy link
Contributor

LGTM

@johnmccutchan johnmccutchan merged commit 5c14444 into flutter:master Aug 17, 2016
exit(0);
});
ProcessSignal.SIGUSR1.watch().listen((ProcessSignal signal) async {
printStatus('Caught SIGUSR1');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should say what's going to happen next, e.g. "Caught SIGUSR1 - attempting hot reload".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hot reload code that we call immediately prints that it is doing a hot reload.

@Hixie
Copy link
Contributor

Hixie commented Aug 17, 2016

LGTM

@johnmccutchan johnmccutchan deleted the remove_control_pipe_for_signals branch November 22, 2016 00:00
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants