Free Downloads, Community Forum,
FAQs and Developer Resources


Make /Tools Your Home | Link to us

Today's posts | Posts since last visit | Most Active Topics

All Forums Register Login Search Subscriptions My Profile Inbox
Tool Warehouse FAQs Resources Help Member List Address Book Logout

Windows coprocess stdin is unexpectedly closed

 
Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [SFU / Interix / SUA Technology] >> Interix Advanced Forum >> Windows coprocess stdin is unexpectedly closed Page: [1]
Login
Message << Older Topic   Newer Topic >>
Windows coprocess stdin is unexpectedly closed - Sep. 14, '06, 11:59:03 AM   
rapid

 

Posts: 8
Joined: Jun. 1, '06,
Status: offline
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
Post #: 1
RE: Windows coprocess stdin is unexpectedly closed - Sep. 14, '06, 1:13:04 PM   
Rodney

 

Posts: 3695
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
Have you tried the cat32 thing already?

(in reply to rapid)
Post #: 2
RE: Windows coprocess stdin is unexpectedly closed - Sep. 15, '06, 5:12:38 AM   
rapid

 

Posts: 8
Joined: Jun. 1, '06,
Status: offline
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

(in reply to rapid)
Post #: 3
RE: Windows coprocess stdin is unexpectedly closed - Sep. 15, '06, 12:06:24 PM   
rapid

 

Posts: 8
Joined: Jun. 1, '06,
Status: offline
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.

(in reply to rapid)
Post #: 4
Page:   [1]
All Forums >> [SFU / Interix / SUA Technology] >> Interix Advanced Forum >> Windows coprocess stdin is unexpectedly closed Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Search All Forums -

Advanced search


SPONSORS



Forum Software © ASPPlayground.NET Advanced Edition 2.5 ANSI

0.031