Correctly compute whether the process is a non-Cygwin process in spawn_guts

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Correctly compute whether the process is a non-Cygwin process in spawn_guts

Igor Peshansky
The attached patch fixes the "no output from commands invoked through ssh"
for me.  The ChangeLog is below.
        Igor
==============================================================================
2006-01-05  Igor Peshansky  <[hidden email]>

        * spawn.cc (spawn_guts): Invert the argument to
        set_console_state_for_spawn.

--
                                http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_    [hidden email] | [hidden email]
ZZZzz /,`.-'`'    -.  ;-;;,_ Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-' old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"

spawn_console_state-fix.patch (952 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Correctly compute whether the process is a non-Cygwin process in spawn_guts

Christopher Faylor-2
On Thu, Jan 05, 2006 at 09:46:46AM -0500, Igor Peshansky wrote:
>The attached patch fixes the "no output from commands invoked through ssh"
>for me.  The ChangeLog is below.
> Igor
>==============================================================================
>2006-01-05  Igor Peshansky  <[hidden email]>
>
> * spawn.cc (spawn_guts): Invert the argument to
> set_console_state_for_spawn.

Did you happen to notice the name of the argument to
"set_console_state_for_spawn"?

Sorry, but this seems to be a "fix the symptom" patch.

Apparently iscygexec is getting set incorrectly.  That is probably the
problem.

cgf

Reply | Threaded
Open this post in threaded view
|

Re: Correctly compute whether the process is a non-Cygwin process in spawn_guts

Igor Peshansky
On Thu, 5 Jan 2006, Christopher Faylor wrote:

> On Thu, Jan 05, 2006 at 09:46:46AM -0500, Igor Peshansky wrote:
> >The attached patch fixes the "no output from commands invoked through
> >ssh" for me.  The ChangeLog is below.
> > Igor
> >==============================================================================
> >2006-01-05  Igor Peshansky  <[hidden email]>
> >
> > * spawn.cc (spawn_guts): Invert the argument to
> > set_console_state_for_spawn.
>
> Did you happen to notice the name of the argument to
> "set_console_state_for_spawn"?

Yes, I did.  It's supposed to be true for a non-Cygwin process and false
for a Cygwin process.  IIUC, my patch makes it so.

> Sorry, but this seems to be a "fix the symptom" patch.
>
> Apparently iscygexec is getting set incorrectly.  That is probably the
> problem.

I may be misunderstanding what iscygexec() does.  I thought it was true if
the process was a Cygwin process, in which case my patch actually fixes
the problem, not the symptom...
        Igor
--
                                http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_    [hidden email] | [hidden email]
ZZZzz /,`.-'`'    -.  ;-;;,_ Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-' old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"

Reply | Threaded
Open this post in threaded view
|

Re: Correctly compute whether the process is a non-Cygwin process in spawn_guts

Christopher Faylor-2
On Thu, Jan 05, 2006 at 10:31:36AM -0500, Igor Peshansky wrote:

>On Thu, 5 Jan 2006, Christopher Faylor wrote:
>
>> On Thu, Jan 05, 2006 at 09:46:46AM -0500, Igor Peshansky wrote:
>> >The attached patch fixes the "no output from commands invoked through
>> >ssh" for me.  The ChangeLog is below.
>> > Igor
>> >==============================================================================
>> >2006-01-05  Igor Peshansky  <[hidden email]>
>> >
>> > * spawn.cc (spawn_guts): Invert the argument to
>> > set_console_state_for_spawn.
>>
>> Did you happen to notice the name of the argument to
>> "set_console_state_for_spawn"?
>
>Yes, I did.  It's supposed to be true for a non-Cygwin process and false
>for a Cygwin process.  IIUC, my patch makes it so.

Agh.  You're right.  I'm an idiot.  I misread the patch.  I even looked at the source
code and still got it wrong.

I'll apply the patch and then go sit in the corner for a while.

cgf