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

Re: [PATCH] pager: use an environment variable for pager_in_use

From
Simon 'corecode' Schubert <corecode@fs.ei.tum.de>
Date
Feb 16, 2007, 19:43 UTC
Message-ID
<45D60962.6010605@fs.ei.tum.de>
In-Reply-To
<Pine.LNX.4.63.0702162004590.22628@wbgn013.biozentrum.uni-wuerzburg.de>
Johannes Schindelin wrote:
Show 6 quoted lines
>> Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
>>> +int pager_in_use = getenv("GIT_PAGER_IN_USE");
>> test.c:3: error: initializer element is not constant
> Sorry.
> 
> Still, it feels wrong to use two system calls when you need none.
getenv() is usually no system call, but processed in userland.
However, I also always get the feeling that using environment variables within one process to communicate state seems wrong, but many old unix tools do it this way.
cheers
  simon
-- 
Serve - BSD     +++  RENT this banner advert  +++    ASCII Ribbon   /"\
Work - Mac      +++  space for low €€€ NOW!1  +++      Campaign     \ /
Party Enjoy Relax   |   http://dragonflybsd.org      Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz       Mail + News   / \
Previous: Johannes Schindelin
Message 7 of 7 in “[BUG] git -p status does not use colors”
  1. Matthias LederhoferFeb 16, 2007
  2. Jeff KingFeb 16, 2007
  3. pager: use an environment variable for pager_in_useMatthias Lederhofer, Feb 16, 2007
  4. Johannes SchindelinFeb 16, 2007
  5. Matthias LederhoferFeb 16, 2007
  6. Johannes SchindelinFeb 16, 2007
  7. Simon 'corecode' SchubertFeb 16, 2007

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.