Re: [PATCHv2 5/9] add generic terminal prompt function
- From
- Pete Wyckoff <pw@padd.com>
- Date
- Dec 15, 2011, 21:59 UTC
- Message-ID
- <20111215215903.GA1917@padd.com>
- In-Reply-To
- <20111215133939.GA2241@sigill.intra.peff.net>
peff@peff.net wrote on Thu, 15 Dec 2011 08:39 -0500:
Show 13 quoted lines
> I agree it might be a little more obvious to put it there (I think what > happened is my initial revision did not look at "echo" ever again, and > then that conditional was added later when I realized that the "!echo" > case needed us to print the newline manually). > > > And why no sigchain_pop() for the signal handler? > > Because I used sigchain_push_common, which has no pop_common analog. But > it's OK, because calling restore_term sets term_fd to -1, making further > calls a no-op. So leaving the handler in place is fine. > > Another option would be to add sigchain_pop_common, which pops the > same signals from push_common.
Thanks for the detailed explanation. It was indeed the lack of symmetry that set me off. I missed the term_fd check for both.
-- Pete