Re: [PATCH 4/4] Add 'filter' attribute and external filter driver definition.

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH 4/4] Add 'filter' attribute and external filter driver definition.

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:06

"Shawn O. Pearce" [off-list ref] writes:
ick.  What about something like this on top?  I moved the extra child
process for the input pipe down into the start_command routine,
where we can do something a little smarter on some systems, like
using a thread rather than a full process.  Its also a shorter
patch and uses more of the run-command API.
Well, I did not like start_command() that wanted to always
perform the full exec of something else for its inflexibility,
and this piles a specific hack on top of it...  Why not a
callback with void * pointer?

Or are you trying to make this interface as inflexible and
feature-limited as possible, perhaps to make it easier to
porting to Windows?

Re: [PATCH 4/4] Add 'filter' attribute and external filter driver definition.

From: Shawn O. Pearce <hidden>
Date: 2016-06-15 22:43:06

Junio C Hamano [off-list ref] wrote:
Well, I did not like start_command() that wanted to always
perform the full exec of something else for its inflexibility,
and this piles a specific hack on top of it...  Why not a
callback with void * pointer?
Well, that's because its always used to execute some external
program.  And some operating system designers once upon a time
thought that was the only way anyone would ever need to start a
new parallel thread of execution.  ;-)

But why do you want a callback here in start_command() given
that all you are doing is running a filter command anyway?
Is that so you could start a "thread" to handle the stdin
pipe?

-- 
Shawn.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help