Windows coprocess stdin is unexpectedly closed (Full Version)

All Forums >> [SFU / Interix / SUA Technology] >> Interix Advanced Forum



Message


rapid -> Windows coprocess stdin is unexpectedly closed (Sep. 14, '06, 11:59:03 AM)

Environment is XP with all latest updates.

I have an Interix process that starts a coprocess via a Korn shell (just to set the PATH to locate DLLs) which runs a Windows executable program with piped stdin, stdout, stderr. There are three processes running: Interix application program, Interix Korn shell, Windows application program.

The controlling Interix process shuts down the Windows coprocess by closing its stdin, like you would with a Unix coprocess.

Everything works a dream except for one nightmare ...

Periodically the Windows coprocess reads zero bytes on its stdin. It can happen at startup, when the pipes are actively sending and receiving, or when nothing has happened for hours.

Obviously this is exactly what happens when stdin is closed by the controlling Interix process.

Do you have any ideas what is causing this or how I can get some diagnostics to help locate the problem ?

Should a mixed environment coprocess work or am I just lucky ?

I've tried using another file descriptor (eg 3 or 103) but the Windows process cannot open it, getting an invalid control block address error.

Thanks

Rapid




Rodney -> RE: Windows coprocess stdin is unexpectedly closed (Sep. 14, '06, 1:13:04 PM)

Have you tried the cat32 thing already?




rapid -> RE: Windows coprocess stdin is unexpectedly closed (Sep. 15, '06, 5:12:38 AM)

On your advice I've now added a cat32 pipe into my Windows application program; all the standard streams are still flowing OK.

Time will tell whether this will insulate stdin from Windows interference.

Thanks Rodney !

Rapid




rapid -> RE: Windows coprocess stdin is unexpectedly closed (Sep. 15, '06, 12:06:24 PM)

Nope - it did not fix it. I've also tried adding another cat32 after the application, same result.

I'm going to be out for a couple of weeks.




Page: [1]



Forum Software © ASPPlayground.NET Advanced Edition 2.5 ANSI

0.047