| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
node.h defines PATH_MAX on Windows so the #ifdef is probably not necessary here.
Sorry, something went wrong.
There was a problem hiding this comment.
I'm not sure if this is a good assumption. I'd just check that it still returns something, possibly something that looks like a path.
Sorry, something went wrong.
There was a problem hiding this comment.
You're right. Updated.
Sorry, something went wrong.
|
LGTM. You should probably run the CI before landing this. |
Sorry, something went wrong.
|
I will once libuv is updated and I can remove the floating patch. |
Sorry, something went wrong.
|
lgtm, the duplication in test-os.js seems unnecessary but I guess it's consistent with what's in there |
Sorry, something went wrong.
|
Libuv 1.6.0 has landed. 👍 |
Sorry, something went wrong.
There was a problem hiding this comment.
At this point, buf would be NULL only.
Sorry, something went wrong.
|
Floating patch removed. CI: https://jenkins-iojs.nodesource.com/view/iojs/job/iojs+any-pr+multi/766/ |
Sorry, something went wrong.
|
@rvagg the CI is still running, but I'm seeing some strange failures. Unable to compile on SmartOS, out of memory errors on FreeBSD, and too many files open on CentOS. Anything odd going on with the build? |
Sorry, something went wrong.
|
@cjihrig eeek, not that I'm aware of, @jbergstroem has been tinkering on CentOS5 but not the others. |
Sorry, something went wrong.
|
I'll have a look. |
Sorry, something went wrong.
|
Affected os:es seems to hit file-max freebsd: kern.maxfiles limit exceeded by uid 1003, please see tuning(7). centos5: VFS: file-max limit 334442 reached Jenkins has <100 file descriptors open which leads me to believe that ccache might try to. I can't say I've seen it previously, but I'll keep digging. |
Sorry, something went wrong.
|
Looking at cat /proc/sys/fs/file-nr (or equivalents) at different machines; can't say I see it grow even close to limits while compiling. |
Sorry, something went wrong.
|
(for reference, the run I'm measuring is here: https://jenkins-iojs.nodesource.com/job/iojs+any-pr+multi/767/) |
Sorry, something went wrong.
|
So yeah, I'm unable to reproduce what happened at that specific run. Jenkins. |
Sorry, something went wrong.
|
Added limits.h in https://github.com/cjihrig/io.js/commit/69c1c33348ac1803615c73e42bf7dfef3155a4a7#diff-2b7b259d26f297c87b7d71512e33ccecR14 to get the compile working on SmartOS. The CentOS failure seemed to be flakey. FreeBSD is still throwing ENOMEM. @bnoordhuis any clue why this might be happening (other than the obvious answer that the process is out of memory)? Updated CI run: https://jenkins-iojs.nodesource.com/view/iojs/job/iojs+any-pr+multi/769/ |
Sorry, something went wrong.
|
I speculate it's because of this. :-) (IIRC, I pointed that out in the review, that sysconf() can return < 0, but I'm not 100% sure. At any rate, bufsize is a size_t so the -1 wraps around and becomes SIZE_MAX.) (EDIT: That may have been another PR, come to think of it.) |
Sorry, something went wrong.
|
@bnoordhuis you did mention that. The data type for bufsize not being switched from size_t to long was my bad (I did add the check for bufsize <= 0, but didn't change the data type). Assuming that this is the problem, I'm curious why this didn't cause a problem with the libuv CI. And, do you think we should ditch the sysconf() call and use something else as the starting point for malloc()? EDIT: this has a good example that calls sysconf() and falls back to a different value if it fails, although they also use a size_t to hold the return value :-) |
Sorry, something went wrong.
|
@bnoordhuis you were right, so I added a37072b as a floating patch on libuv, and the CI is much happier now. Let me know how you want this handled in libuv. |
Sorry, something went wrong.
|
@cjihrig Left a comment. Can you file that as a libuv PR? We'll do a patch release for that. |
Sorry, something went wrong.
|
Ah, should've tested the branch while searching for issues; I just assumed it was lingering processes or similar. |
Sorry, something went wrong.
|
@bnoordhuis if I update the floating patch here, is this OK to land? EDIT: Removed the floating patch since the libuv update PR was opened. |
Sorry, something went wrong.
Sorry, something went wrong.
|
Thanks @saghul. Hopefully one last CI run: https://jenkins-iojs.nodesource.com/view/iojs/job/iojs+any-pr+multi/774/ |
Sorry, something went wrong.
|
Hmmm.. freebsd isn't so happy. https://jenkins-iojs.nodesource.com/view/iojs/job/iojs+any-pr+multi/774/nodes=freebsd101-64/tapTestReport/ |
Sorry, something went wrong.
os.homedir() calls libuv's uv_os_homedir() to retrieve the current user's home directory. PR-URL: #1791 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Rod Vagg <rod@vagg.org>
|
It would help if I rebased the branch to include the libuv 1.6.1 update. https://jenkins-iojs.nodesource.com/view/iojs/job/iojs+any-pr+multi/775/ is all green. Landed in 6e78e5f. |
Sorry, something went wrong.
Notable Changes: * libuv: Upgraded to 1.6.0 and 1.6.1, see full ChangeLog for details. (Saúl Ibarra Corretgé) #1905 #1889. Highlights include: - Fix TTY becoming blocked on OS X - Fix UDP send callbacks to not to be synchronous - Add uv_os_homedir() (exposed as os.homedir(), see below) * npm: See full release notes for details. (Kat Marchán) #1899. Highlight: - Use GIT_SSH_COMMAND (available as of Git 2.3) * openssl: - Upgrade to 1.0.2b and 1.0.2c, introduces DHE man-in-the-middle protection (Logjam) and fixes malformed ECParameters causing infinite loop (CVE-2015-1788). See the security advisory for full details. (Shigeki Ohtsu) #1950 #1958 - Support FIPS mode of OpenSSL, see README for instructions. (Fedor Indutny) #1890 * os: Add os.homedir() method. (Colin Ihrig) #1791 * smalloc: Deprecate whole module. (Vladimir Kurchatkin) #1822 * Add new collaborators: - Alex Kocharin (@rlidwka) - Christopher Monsanto (@monsanto) - Ali Ijaz Sheikh (@ofrobots) - Oleg Elifantiev (@Olegas) - Domenic Denicola (@domenic) - Rich Trott (@Trott)
|
I made a polyfill for anyone wanting to use this while still supporting older node/io versions: |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Do not land this yet.
This PR adds os.homedir(), which calls libuv's uv_os_homedir() to retrieve the current user's home directory. This is an alternative to #1670. This PR currently consists of two commits. 6887116 is the libuv update, which has not landed in io.js yet. This commit should be removed once a proper update is in place. e7e5992 is the io.js update.