git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [ANNOUNCE] EasyGit (eg) 0.97

From
Jeff King <peff@peff.net>
Date
Jan 30, 2009, 20:03 UTC
Message-ID
<20090130200307.GA3054@coredump.intra.peff.net>
In-Reply-To
<20090130194727.GA31927@coredump.intra.peff.net>
On Fri, Jan 30, 2009 at 02:47:27PM -0500, Jeff King wrote:
Show 7 quoted lines
> There is also a related set of fixes for spawning externals via fork,
> which fixes a bug with the pager not getting cleaned up. But it looks
> like it is also in the version you tested.
> 
> Can you give a more complete recipe for reproducing? Since I was just
> touching this area in git, I want to make sure it isn't a git bug you
> are triggering. :)

Ah, OK. I just peeked through the 'eg' source. It looks like you may have replicated the same bug that I just fixed in git. :)

You want to make sure that "eg" is the last process to die (i.e., _after_ the pager). Otherwise after it dies, less has trouble reading from the terminal (I don't know for sure, but I assume this has to do with the shell making "eg" the process group leader and magic about process groups and controlling terminals).

I think perl may even do the wait() for you under ordinary circumstances. But, for example, if I kill "eg" with a signal (say, by hitting ^C), then it will die but the pager will live on. In git, we catch the signal and wait() before dying.

So I don't know for sure that is your problem (it really depends on how much magic perl is doing behind the scenes with wait()ing on children, and I don't recall the exact details of that). But it is something to look into.

I don't think it's a git problem, though. "eg log" doesn't spawn a git pager, since you pipe the output into eg. The paging is all your local "less" invocation.

-Peff
Previous: Jeff KingNext: Elijah Newren
Message 5 of 10 in “[ANNOUNCE] EasyGit (eg) 0.97”
  1. Elijah NewrenJan 30, 2009
  2. Mike RalphsonJan 30, 2009
  3. Elijah NewrenJan 30, 2009
  4. Jeff KingJan 30, 2009
  5. Jeff KingJan 30, 2009
  6. Elijah NewrenJan 30, 2009
  7. Elijah NewrenJan 30, 2009
  8. Jeff KingJan 30, 2009
  9. Elijah NewrenJan 30, 2009
  10. Jeff KingJan 31, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.