All Forums |
Register |
Login |
Search |
Subscriptions |
My Profile |
Inbox |
Tool Warehouse |
FAQs |
Resources |
Help |
Member List |
Address Book |
Logout |
|
|
Plumbing posix and windows processes together
|
Logged in as: Guest |
Users viewing this topic: none |
|
Login |
|
|
Plumbing posix and windows processes together - Jun. 19, '06, 11:40:08 AM
|
|
|
rapid
Posts: 8
Joined: Jun. 1, '06,
Status: offline
|
I want to create a windows process as a coprocess of a posix process. The posix process will write to the coprocess STDIN and read its STDOUT and STDERR.
It seems to partly work but the coprocess STDOUT did not reach the posix process, and the coprocess did not detect its STDIN closing.
Does this stand a chance of working or am I wasting my time ?
|
|
|
RE: Plumbing posix and windows processes together - Jun. 19, '06, 1:35:30 PM
|
|
|
Rodney
Posts: 3714
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
|
The model for pipes (I assume you are using pipes) is different between
Unix and Win32. The behavioral differences can lead to circumstances
taht don't work out. Try giving the cat32 man page a read for
some information that might be helpful to you.
< Message edited by Rodney -- Jun. 19, '06, 1:40:43 PM >
|
|
|
RE: Plumbing posix and windows processes together - Jun. 20, '06, 9:31:55 AM
|
|
|
rapid
Posts: 8
Joined: Jun. 1, '06,
Status: offline
|
I tried in Interix exec'ing /bin/ksh with arguments "-c <path to Windows executable>".
The coprocess works fine. I also needed to setvbuf() the streams to unbuffered in the Windows program.
Seems you need /bin/ksh in between the processes.
|
|
|
RE: Plumbing posix and windows processes together - Jun. 21, '06, 11:30:58 AM
|
|
|
woehlkmp
Posts: 102
Status: offline
|
You might also want to read this thread about the highly questionable utility of cat32. My experience has been that it is totally backwards from what it needs to do. The aforementioned thread discusses fixing the problem from what, in my opinion, is the correct direction. Depending on what, exactly, you are trying to do, this might allow you to eliminate the ksh wrapper from the equation. At any rate, I can assure you that the program I wrote receives stdout from Windows-subsystem applications, so you might want to compare notes.
|
|
|
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 |
|
|
|