develooper Front page | perl.perl5.porters | Postings from December 2003

Re: BUG fork/pipe on windows

Thread Previous | Thread Next
From:
Nick Ing-Simmons
Date:
December 8, 2003 00:58
Subject:
Re: BUG fork/pipe on windows
Message ID:
20031208085836.2830.9@llama.elixent.com
Uri Guttman <uri@stemsystems.com> writes:
>no one responded to this post 

Only the ActiveState crowd _really_ understand the windows port,
and they don't always watch here.

>and i think it is important. 

Lots of stuff on Windows doesn't work as POSIX.

>there is
>either a bug in fork for winblows or a bug in the docs. the example
>shown in perlfork does not work on windows. 

Patches (even doc patches that say this doesn't work on windows) welcome.
Also welcome is a complete script which when run on Windows prints
"not ok"
and when run on POSIX prints "ok".

There are several things that could be wrong
  - psuedo fork juggling fds in the parent/child "thread"
  - Win32 PIPE semantics not being same
  - trying to use select() on a pipe (doomed...)

>i worked around it by using
>socketpair and that is fine but still someone should verify what i found
>and hopefully something can be done to fix it.
>
>thanx,
>
>uri
>
>>>>>> "UG" == Uri Guttman <uri@stemsystems.com> writes:
>
>  UG> i am trying to use the fork/pipe examples at the end of perlfork
>  UG> (5.8). when i run the pipe_to_fork example it works. the pipe_from_fork
>  UG> just hangs.
>
>
>  UG> in the docs for open there is coverage of open(FILEHANDLE, "<&=$fd")
>  UG> (which is used in pipe_to_fork)
>
>  UG> but there in no mention of the other direction which would be
>  UG> open(FILEHANDLE, ">&=$fd") which is used in pipe_from_fork.
>
>  UG> so there is either a bug in open in not supporting
>  UG> open(FILEHANDLE, ">&=$fd") or in the perlfork doc for mentioning it and
>  UG> showing a broken example.
>
>  UG> any ideas or answers?


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About