public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: Unable to fdopen() a pipe handle
       [not found] <5010400024885002000002L022*.cygnus.gnu-win32@MHS>
@ 1998-07-14  8:29 ` Christopher G. Faylor
  0 siblings, 0 replies; 4+ messages in thread
From: Christopher G. Faylor @ 1998-07-14  8:29 UTC (permalink / raw)
  To: gnu-win32

In article <5010400024885002000002L022*.cygnus.gnu-win32@MHS>,
Craig Setera <setera@us.ibm.com> wrote:
>I've got a chunk of code that create an anonymous pipe using pipe() and then
>attempts to create a write stream on the pipe using fdopen() (something like
>this... from memory... not necessarily correct):
>
>int mypipe[2];
>FILE *mystream;
>
>pipe(mypipe);
>mystream = fdopen(mypipe[1], "w");
>
>I can't seem to get fdopen() to return anything other than NULL.  Any thoughts?

I just tried this and it works fine for me.  I'd be surprised if it didn't
since this is a very common thing to do.  Try upgrading to a "coolview"
version of cygwin.dll:  http://www.lexa.ru/sos .
-- 
cgf@cygnus.com             "Everything has a boolean value, if you stand
http://www.cygnus.com/      far enough away from it."  -- Galena Alyson Canada
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Unable to fdopen() a pipe handle
@ 1998-07-14  4:50 Earnie Boyd
  0 siblings, 0 replies; 4+ messages in thread
From: Earnie Boyd @ 1998-07-14  4:50 UTC (permalink / raw)
  To: Craig Setera; +Cc: gw32

---Craig Setera <setera@us.ibm.com> wrote:
>
> I've got a chunk of code that create an anonymous pipe using pipe()
and then
> attempts to create a write stream on the pipe using fdopen()
(something like
> this... from memory... not necessarily correct):
> 
> int mypipe[2];
> FILE *mystream;
> 
> pipe(mypipe);
> mystream = fdopen(mypipe[1], "w");
> 
> I can't seem to get fdopen() to return anything other than NULL. 
Any thoughts?

Well, I thought I had some then I started some research.  I've drawn
the conclusion that it won't work because the pipes are half-duplex. 
However, you should be able to fopen a /dev/null and use dup2 to
accomplish what you want (maybe:).

Anybody else?
==
-        \\||//
---o0O0--Earnie--0O0o----
--earnie_boyd@yahoo.com--
------ooo0O--O0ooo-------



_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Unable to fdopen() a pipe handle
@ 1998-07-14  0:08 Sergey Okhapkin
  0 siblings, 0 replies; 4+ messages in thread
From: Sergey Okhapkin @ 1998-07-14  0:08 UTC (permalink / raw)
  To: gnu-win32, 'Craig Setera'

Craig Setera wrote:
> I've got a chunk of code that create an anonymous pipe using pipe() and then
> attempts to create a write stream on the pipe using fdopen() (something like

Upgrade cygwinb19.dll at least to b19.1.

-- 
Sergey Okhapkin, http://www.lexa.ru/sos
Moscow, Russia.

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Unable to fdopen() a pipe handle
@ 1998-07-13  5:50 Craig Setera
  0 siblings, 0 replies; 4+ messages in thread
From: Craig Setera @ 1998-07-13  5:50 UTC (permalink / raw)
  To: gnu-win32

I've got a chunk of code that create an anonymous pipe using pipe() and then
attempts to create a write stream on the pipe using fdopen() (something like
this... from memory... not necessarily correct):

int mypipe[2];
FILE *mystream;

pipe(mypipe);
mystream = fdopen(mypipe[1], "w");

I can't seem to get fdopen() to return anything other than NULL.  Any thoughts?

Craig


Craig Setera
AS/400 Enterprise Java Development
IBM Rochester
setera@us.ibm.com
(507) 253-3387 - Tie: 553-3387
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1998-07-14  8:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <5010400024885002000002L022*.cygnus.gnu-win32@MHS>
1998-07-14  8:29 ` Unable to fdopen() a pipe handle Christopher G. Faylor
1998-07-14  4:50 Earnie Boyd
  -- strict thread matches above, loose matches on Subject: below --
1998-07-14  0:08 Sergey Okhapkin
1998-07-13  5:50 Craig Setera

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).