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 |
|
Login |
|
|
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
|
|
|
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?
|
|
|
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
|
|
|
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.
|
|
|
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 |
|
|
|