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

Plumbing posix and windows processes together

 
Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [SFU / Interix / SUA Technology] >> Interix Advanced Forum >> Plumbing posix and windows processes together Page: [1]
Login
Message << Older Topic   Newer Topic >>
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 ?
Post #: 1
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 >

(in reply to rapid)
Post #: 2
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.

(in reply to Rodney)
Post #: 3
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.

(in reply to rapid)
Post #: 4
Page:   [1]
All Forums >> [SFU / Interix / SUA Technology] >> Interix Advanced Forum >> Plumbing posix and windows processes together 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.094