[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

communicate with named pipe

Jiansong Li

2/20/2005 3:39:00 PM

I am a newbie of this mailing place but I want to draw a gui for other
program via ruby. That program is written by C++ and creaded two pipe:
mkfifo(read_str,0600)
readfd=open(read_str,O_RDWR)
mkfifo(write_str,0600)
writefd=open(write_str,O_RDWR).
I serched all the subject through the mailing list but can't find useful
information to help me create a named pipe.
Who can give me a hand?



5 Answers

William Morgan

2/20/2005 6:49:00 PM

0

Excerpts from Jiansong Li's mail of 20 Feb 2005 (EST):
> I am a newbie of this mailing place but I want to draw a gui for other
> program via ruby. That program is written by C++ and creaded two pipe:
> mkfifo(read_str,0600)
> readfd=open(read_str,O_RDWR)
> mkfifo(write_str,0600)
> writefd=open(write_str,O_RDWR).
> I serched all the subject through the mailing list but can't find useful
> information to help me create a named pipe.

If the C++ program is creating the pipes, you can simply open them as
ordinary files from Ruby.

If you want to create the pipes from Ruby, you'll have to use a system
call:

path = "/path/to/fifo"
system("mkfifo #{path}")

Or wait for the patch in [ruby-talk:91735] to be integrated.

--
William <wmorgan-ruby-talk@masanjin.net>


conwaycaine

9/5/2009 2:00:00 PM

0


<deemsbill@aol.com> wrote in message
news:756f2d12-d97b-4363-be0b-35860f65e250@s31g2000yqs.googlegroups.com...
>> I remember some years back marketing genius had the packages marked
>> "Small",
>> "Medium", and "Large".
>> Guess which package outsold the rest by a ten to one margin.
>
> I wonder what the different % was when women were buying
> them......

"Small", naturally.
Women tend to be realists.


deemsbill@aol.com

9/5/2009 2:14:00 PM

0

On Sep 5, 10:00 am, "conwaycaine" <conwayca...@bellsouth.net> wrote:
> <deemsb...@aol.com> wrote in message
>
> news:756f2d12-d97b-4363-be0b-35860f65e250@s31g2000yqs.googlegroups.com...
>
> >> I remember some years back marketing genius had the packages marked
> >> "Small",
> >> "Medium", and "Large".
> >> Guess which package outsold the rest by a ten to one margin.
>
> >    I wonder what the different % was when women were buying
> > them......
>
> "Small", naturally.
> Women tend to be realists.

Exactly. And they probably don't want them slipping off.

Old joke:

Superman and Lois Lane are finally consummating their
relationship. Superman strips down and only has a 2" penis. Lois asks
"Who are you going to please with that?" and he replies "Myself!"

conwaycaine

9/5/2009 4:12:00 PM

0


<deemsbill@aol.com> wrote in message
news:d7e9d0ba-ab38-4f59-bce7-2f528b1d93ea@w36g2000yqm.googlegroups.com...
On Sep 5, 10:00 am, "conwaycaine" <conwayca...@bellsouth.net> wrote:
> <deemsb...@aol.com> wrote in message
>
> news:756f2d12-d97b-4363-be0b-35860f65e250@s31g2000yqs.googlegroups.com...
>
> >> I remember some years back marketing genius had the packages marked
> >> "Small",
> >> "Medium", and "Large".
> >> Guess which package outsold the rest by a ten to one margin.
>
> > I wonder what the different % was when women were buying
> > them......
>
> "Small", naturally.
> Women tend to be realists.

Exactly. And they probably don't want them slipping off.

Old joke:

Superman and Lois Lane are finally consummating their
relationship. Superman strips down and only has a 2" penis. Lois asks
"Who are you going to please with that?" and he replies "Myself!"

******

You do realize that children as well as pee pee read these posts?


deemsbill@aol.com

9/5/2009 4:53:00 PM

0

On Sep 5, 12:11 pm, "conwaycaine" <conwayca...@bellsouth.net> wrote:
> <deemsb...@aol.com> wrote in message
>
> news:d7e9d0ba-ab38-4f59-bce7-2f528b1d93ea@w36g2000yqm.googlegroups.com...
> On Sep 5, 10:00 am, "conwaycaine" <conwayca...@bellsouth.net> wrote:
>
> > <deemsb...@aol.com> wrote in message
>
> >news:756f2d12-d97b-4363-be0b-35860f65e250@s31g2000yqs.googlegroups.com...
>
> > >> I remember some years back marketing genius had the packages marked
> > >> "Small",
> > >> "Medium", and "Large".
> > >> Guess which package outsold the rest by a ten to one margin.
>
> > > I wonder what the different % was when women were buying
> > > them......
>
> > "Small", naturally.
> > Women tend to be realists.
>
>     Exactly. And they probably don't want them slipping off.
>
>     Old joke:
>
>      Superman and Lois Lane are finally consummating their
> relationship. Superman strips down and only has a 2" penis. Lois asks
> "Who are you going to please with that?" and he replies "Myself!"
>
> ******
>
> You do realize that children as well as pee pee read these posts?

It's never too early to start learnin' 'bout nature.