# Non blocking file i/o support for win32.

- Thread: https://externals.io/message/43870
- Original archive: https://news-web.php.net/php.internals/43870
- Started by Richard Quadling on 2009-05-08T09:59:43+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #43870 — Richard Quadling — 2009-05-08T09:59:43+00:00

URL: https://externals.io/message/43870#43870

Hi.

Can anyone with windows knowledge take a quick look at
http://bugs.php.net/bug.php?id=47918. I'm pretty sure this IS a bug.
I'm hoping you don't say it is a documentation bug and it is something
you can fix.

My requirement is to allow non-blocking file i/o.

With non-win32, it seems that the fcntl() function can accept
O_NONBLOCK. This does not seem to be present on win32.


The doc for `fopen()` does not mention 'n' as being available (probably
for this reason).


Regards,

Richard.

-- 
-----
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

---

## #43871 — Kalle Sommer Nielsen — 2009-05-08T12:38:13+00:00

URL: https://externals.io/message/43870#43871 · In reply to: #43870

Hi Richard

2009/5/8 Richard Quadling <rquadling@googlemail.com>:
> Hi.
>
> Can anyone with windows knowledge take a quick look at
> http://bugs.php.net/bug.php?id=47918. I'm pretty sure this IS a bug.
> I'm hoping you don't say it is a documentation bug and it is something
> you can fix.
>
> My requirement is to allow non-blocking file i/o.
>
> With non-win32, it seems that the fcntl() function can accept
> O_NONBLOCK. This does not seem to be present on win32.

fcntl() is not available on Windows aswell as O_NONBLOCK, but after
some small research we could perhaps use the iocsocket() function with
the FIONBIO flag to emulate O_NONBLOCK on Windows.

>
>
> The doc for `fopen()` does not mention 'n' as being available (probably
> for this reason).

The 'n' mode was added in 5.3 RC2 by Mikko, but has not yet been documented.

>
>
> Regards,
>
> Richard.
>
> --
> 
> 
>
>



-- 
Kalle Sommer Nielsen
kalle@php.net
