You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

77 lines
3.5 KiB

- Implement setenv / unsetenv
- Implement other stuff missing in node.cc/process
Like getuid, getgid, setgid, kill etc.
- Implement missing `net` methods
A pressing issue is: how do we work with windows api functions that are not utf8 aware?
E.g. getaddrinfo() is ansi-only; GetAddrInfoW is utf16-only. Can we get utf16 straight out of v8?
Are unix sockets similar to windows named pipes? If so, should they be supported? -> currently: no. Complication: they block.
- Child processes
Should not be too hard using CreatePipe, CreateProcessW and GetExitCodeProcess.
Hooking up the child to a socket is tricky but it can be done (http://www.spinellis.gr/sw/unix/socketpipe/socketpipe-win.c)
Waiting for the child to exit is tricky, probably would require a wait thread to wait for the child, then ev_async notify.
How can we distinguish between the exit code and exception number after calling GetExitCodeProcess?
- Stdio (make TTY's / repl / readline work)
This will be hard: there is no ANSI escape code support in windows.
Select() doesn't work on TTYs -- use a dedicated `getchar()` thread
that relays everything to an internal socket?
Also verify writeError and isStdoutBlocking correctness.
- Think about exposing the platform through the process object
It sucks but it may be necessary to know which platfom you're running on, e.g.
you can't do spawn('grep') on windows (unless there's msys).
Something like process.os or process.platform?
- Skip/fix tests that can never pass on windows
- Find a solution for fs.symlink / fs.lstat / fs.chown
Windows has different symlink types: file symlinks (vista+), directory symlinks (vista+), junction points (xp+)
- Handle _open_osfhandle failures
E.g. currently we're using the construct _open_osfhandle(socket/open/accept(...)).
Now socket() can fail by itself and _open_osfhandle can fail by itself too.
If socket() fails it returns -1 so _open_osfhandle fails as well, but and we'll always return/throw EBADF.
If _open_osfhandle fails but socket doesn't, a stray handle is left open. It should be fixed.
- Check error number mappings.
Winsock errnos are sometimes different.
- Think about `make install`
- Extensions
Should be DLLs on windows.
- Link pthreads-w32 statically by default
- Link Mingw libraries statically by default
Like libstdc++.dll, more maybe.
Microsoft libs are always there, no static linkage required (e.g. msvcrt, winsock2).
- Make (open?)SSL work
- Support using shared libs (libeio, v8, c-ares)
Need to link with with a stub library. Libraries should use `dllexport`, headers must have `dllimport`.
- V8: push MINGW32 build fixes upstream
- Work with the V8 team to get the stack corruption bug fixed
- Work around missing pread/pwrite more elegantly
Currently it's exported from libeio, while it wasn't intended to be exported.
The libeio workaround implementation sucks, it uses a global mutex.
It should be possible to implement pread and pwrite using winapi's ReadFile/Writefile
directly, passing an OVERLAPPED structure while not associating with an completion port.
- Work around missing inet_pton/inet_ntop more elegantly
Currently it's exported from from c-ares, while it wasn't intended to be exported.
It prevents linking c-ares dynamically.
- See what libev/libeio changes can be pushed upstream
- 64-bit build
Should be possible with MinGW-w64, it's pretty good.
- ... much more probably