All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Improving xtrace output from subshells
       [not found]         ` <e9cdb884-89d6-9b9d-3cb8-38b9b862aa9d@gigawatt.nl>
@ 2020-05-28 11:57           ` Harald van Dijk
  0 siblings, 0 replies; only message in thread
From: Harald van Dijk @ 2020-05-28 11:57 UTC (permalink / raw)
  To: Vadim Zeitlin, dash

On 29/04/2019 23:55, Harald van Dijk wrote:
> On 29/04/2019 15:44, Vadim Zeitlin wrote:
>> On Sat, 27 Apr 2019 22:58:23 +0100 Harald van Dijk 
>> <harald@gigawatt.nl> wrote:
>> HvD> It wastes memory: the code should be re-worked so that output and
>> HvD> preverrout share the same buffer, given that there can never be 
>> pending
>> HvD> output for one when the other is being written to.
>>
>>   I'm a bit worried about this one, it doesn't seem completely obvious 
>> to me
>> that the 2 objects can't be used at the same time.
> 
> It's indeed not completely obvious, but all bits that print to output 
> will flush the buffer when they're done, before a next command starts 
> executing, before the next command requires an xtrace string to be 
> printed. It's usually the flushall() in evalbltin() that handles this.

I have managed to verify that using a single buffer for all streams 
(output, errout and preverrout) works well and simplifies logic so that 
the shell with that change is actually smaller than the one without it. 
I do not know whether there would be interest in getting that in dash.

Cheers,
Harald van Dijk

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-05-28 11:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <E1hJgiD-0002yZ-Qb@smtp.tt-solutions.com>
     [not found] ` <6102c49c-573b-0fee-9a5d-f844eab2e8c0@gigawatt.nl>
     [not found]   ` <E1hKNxE-0007Iw-04@smtp.tt-solutions.com>
     [not found]     ` <6e753e30-1df6-ec65-07c4-5337b9f93901@gigawatt.nl>
     [not found]       ` <E1hL7Vk-0005Me-22@smtp.tt-solutions.com>
     [not found]         ` <e9cdb884-89d6-9b9d-3cb8-38b9b862aa9d@gigawatt.nl>
2020-05-28 11:57           ` Improving xtrace output from subshells Harald van Dijk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.