2 files changed,
+8
−4
domains_transfer_cli.go
+7 −3
internal/provision/testdata/plan14-root-reads-domain-transfers.tsv
+1 −1
| index 1be04faea..1d2fb04af 100644 |
| --- a/domains_transfer_cli.go |
| +++ b/domains_transfer_cli.go |
| @@ -115,8 +115,9 @@ func runDomainsTransfer(args []string) error { |
| |
| // readTransferCodeTerminal reads one line from the terminal fd without |
| // echoing it. The terminal is restored when the read returns, and on an |
| -// interrupt or termination during it, after which the process exits as |
| -// the signal would have it. |
| +// interrupt or termination during it, after which the signal is delivered |
| +// again with its default action, so the process ends as it would have |
| +// (where a signal cannot be sent to itself, as on Windows, it is killed). |
| func readTransferCodeTerminal(fd int) (string, error) { |
| state, err := term.GetState(fd) |
| if err != nil { |
| @@ -134,7 +135,10 @@ func readTransferCodeTerminal(fd int) (string, error) { |
| case sig := <-signals: |
| _ = term.Restore(fd, state) |
| fmt.Fprintln(os.Stderr) |
| - os.Exit(signalExit(sig)) |
| + signal.Stop(signals) |
| + if self, err := os.FindProcess(os.Getpid()); err == nil && self.Signal(sig) != nil { |
| + _ = self.Kill() |
| + } |
| case <-done: |
| } |
| }() |
| index 5b71f36c0..fa1a3f30c 100644 |
| --- a/internal/provision/testdata/plan14-root-reads-domain-transfers.tsv |
| +++ b/internal/provision/testdata/plan14-root-reads-domain-transfers.tsv |
| @@ -1,4 +1,4 @@ |
| # Census overlay domain-transfers, written by census-propose (#369). census-ruling-domain-transfers, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-domain-transfers.md. |
| # 0 body, 0 sites, 2 envelope: each changed unit re-frozen at its existing disposition with its claim appended. |
| -@coverage . d7572d2fed9f5800c4d48bed6b3098bf7e38dc4005521067e2e58fa3ca37136a |
| +@coverage . b38afecfe2f7bcc8efbcb700134cf51025bcb6eb3375c2a3078bc15cdc7f26c5 |
| @coverage internal/registrar e21ce8885350c0ad730c1a885568f4c07af266a1b4d6b4c50b063df76e666798 |