b2e6be1cc1d375ca2fc28ee1fdfc10c0adc2554d |
|
29-Sep-2012 |
Elliott Hughes <enh@google.com> |
Rewrite NIO Pipe to use socketpair(2). Our Pipe originally used socket(2) to create AF_INET/AF_INET6 sockets. This was clearly a bad idea. I rewrote it to use socketpair(2) and AF_UNIX, but this was before the big "expose POSIX" rewrite, so it required a bunch of hacks in the native code, so I went with pipe(2) instead. The trouble with pipe(2) is that we end up using FileChannel to implement the Pipe.SinkChannel and Pipe.SourceChannel, but the kernel won't wake a read(2) on a pipe if another thread calls close(2) on it, so we started failing interrupt tests. This (final?) rewrite is hopefully the best of all worlds: we don't have any INTERNET permission needs, the code is as simple as the pipe(2) code, and interruption works. Bug: 7084342 Bug: 2735373 Bug: http://code.google.com/p/android/issues/detail?id=9431 (cherry picked from commit 3218082325b6b8713a8ac15731482e3da86a7df9) Change-Id: Ib92cdf8c818f6bba1f00e191f1b624ce9e693754
|
03c772cadc72ca8cbcde78b266a347dbc6e68ad4 |
|
24-Sep-2012 |
Elliott Hughes <enh@google.com> |
Fix umask. (cherry-pick of acba45cc4b1f98f67fcdeda2f7c13ed57659b92a.) Bug: 7094213 Change-Id: I0c5cbfbfcd937e2393b30f3f50edea40586278cb
|
acba45cc4b1f98f67fcdeda2f7c13ed57659b92a |
|
24-Sep-2012 |
Elliott Hughes <enh@google.com> |
Fix umask. Bug: 7094213 Change-Id: I81979e6f050912cdc4cde8084765d09ec64c0689
|
6c9b5377550a9649ed1532d1fcdfeba116c74ead |
|
21-Sep-2012 |
Elliott Hughes <enh@google.com> |
Add setsid. See "Monkey not handling SIGHUP signal" (https://android-review.googlesource.com/43053). Change-Id: Ib327702caefa8eb8d044723c270acfe4685c7551
|
bb5816aa1626eb2f6263bd21479600b114c8a1bd |
|
10-Jan-2012 |
Johan Redestig <johan.redestig@sonymobile.com> |
Make FileDescriptor.sync() work on ttys fsync on Linux fails on tty file descriptors. This change adds the capability to make sure all data was written to the terminal device descriptor to java.io.FileDescriptor.sync() implementation. Also fixed the return value from Posix_isatty. isatty returns 1 if an fd is a tty and 0 otherwise. Change-Id: I6cc65db83f523b4c31b67b48d7534e18af0989e8
|
1124a814d698ed6fd68ac501f5dddfa103d656fd |
|
29-Aug-2012 |
Elliott Hughes <enh@google.com> |
Fix two unused variable warnings, and tidy up NET_FAILURE_RETRY. Despite being the original author, every time I look at NET_FAILURE_RETRY I think the uninitialized "int fd;" is a bug. So let's kill that. Potentially we could offer even more complete exception detail messages now, but I've left that as a possible TODO. Change-Id: I3a175c659dd6bdeb111938e2547710bb4880cc02
|
44f7875f2985d7944c5afecc8394ad9f2219c806 |
|
16-Aug-2012 |
Elliott Hughes <enh@google.com> |
Add chown, fchmod, fchown, lchown, and umask. Bug: 6141031 Bug: 3107501 Change-Id: I3f514f615b397f57340066f26d43320fb3c219fa
|
9634b569a92841f32268907c88c408f22cb00486 |
|
18-May-2012 |
Elliott Hughes <enh@google.com> |
Stop using -fvisibility=hidden. It breaks backtraces, and backtraces are useful. (The debugger uses the ELF debug info, so it doesn't care, but backtracing just uses the symbols.) (cherry-pick of da2fb9754a9ccfa954c1b554982f06e7cf7d680a.) Bug: 6447213 Change-Id: I957df0e935b61bcf5fefc0e506ecdaa862bc7d07
|
da2fb9754a9ccfa954c1b554982f06e7cf7d680a |
|
18-May-2012 |
Elliott Hughes <enh@google.com> |
Stop using -fvisibility=hidden. It breaks backtraces, and backtraces are useful. (The debugger uses the ELF debug info, so it doesn't care, but backtracing just uses the symbols.) Bug: 6447213 Change-Id: I2893191d7cec57a04bf7b3f4eea54e699df10507
|
7cd6760f7045d771faae8080a8c6150bf678f679 |
|
04-May-2012 |
Elliott Hughes <enh@google.com> |
Make libjavacore independent of libnativehelper for the PDK. Bug: 6369821 Change-Id: Ie038571a5dac1f301c0c3c6fb84df432e67b62c0
|
796f0d5a4e7b83c3efc5e587b6766977dc20b0c3 |
|
16-Feb-2012 |
Elliott Hughes <enh@google.com> |
Fix asynchronous interruption of Socket.connect with a timeout. Turns out there was one connect variant I hadn't properly addressed. Bug: http://code.google.com/p/android/issues/detail?id=24318 Change-Id: I7af697bdf6ea17ad1f8ea904d7d8a051ffb970d2
|
75cf14944d476670f6f915e5efd849e238a16250 |
|
16-Feb-2012 |
Elliott Hughes <enh@google.com> |
Throw SecurityException for DNS without INTERNET permission. When GoogleTV had to work around this for glibc, I realized that maybe I was the problem, not the C library... Bug: http://code.google.com/p/android/issues/detail?id=15722 Change-Id: Ia3fbf2f4578ad60d84e538819660c181248f1e1c
|
679cf68b607e9b4a3beb8bcdee06868ae583386f |
|
08-Jan-2012 |
Steve Block <steveblock@google.com> |
Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE See https://android-git.corp.google.com/g/#/c/157220 Bug: 5449033 Change-Id: I3deb0b1b71cf4ec6d82921a2e0015c3a7b397cbf
|
39fd5e164f93ab821841aa4d1fac09055c102b8b |
|
14-Aug-2011 |
Elliott Hughes <enh@google.com> |
Don't try to access a long field as an int field. I've raised a bug to enhance CheckJNI. For now, this was caught by a setSoTimeout test. Bug: 5159133 Change-Id: If28e81b97c2fdd870ebbcd36d9d0bc01be9d8cf1
|
e3b6fa2bf357f2712ab2ee9e8487f157595ea0c7 |
|
10-Jun-2011 |
Elliott Hughes <enh@google.com> |
Expose pread and pwrite. And fix FileChannel to use them. Bug: 4183719 Bug: 3107501 Change-Id: I51114a16522b93bf959b5953bec658e6889054c6
|
fc041ff241f9a7556e72236f130de0215ecd17db |
|
03-Jun-2011 |
Elliott Hughes <enh@google.com> |
Remove support for deprecated IPv4 address formats. Bug: 4539262 Change-Id: Ic42173b7b06e8536e8c4331087720d7df1e1681a
|
9b510df35b57946d843ffc34cf23fdcfc84c5220 |
|
28-May-2011 |
Elliott Hughes <enh@google.com> |
Make ErrnoException a checked exception. Bug: 4486011 Change-Id: I1877ce593d441653f75ab14884aa2d85f52652ad
|
8ecbb3f6a89983adb1a085469befc70488f4f04f |
|
27-May-2011 |
Elliott Hughes <enh@google.com> |
Don't use mapped IPv4 addresses with MCAST_JOIN_GROUP. This change is really a one-liner, but I did some cleanup too. This fixes most of the Harmony multicast tests. Change-Id: I37ff9c6ee6ee64de0500ef4b51638b3d3a6417ff
|
9e67ca71d3d4a489a157abadc5ba519ced7a0b50 |
|
20-May-2011 |
Elliott Hughes <enh@google.com> |
Expose waitpid(2). This lets us move the process reaper up into Java. I've rearranged the code a bit for the benefit of those looking at stack traces: it's now much clearer when we're idle because there are no children to wait on, which previously looked like we were blocked trying trying to report the exit of a child. Bug: 3107501 Change-Id: I8c5c2952cbdbf9b5a6d8954b4964011d052a90a3
|
553d98af897f7202de5e5a776287de0b5ca8fe39 |
|
19-May-2011 |
Elliott Hughes <enh@google.com> |
Expose accept(2). The implementation of PlainSocketImpl.accept is made ugly by the fact that the SocketImpl we mutate may share its FileDescriptor with a SocketChannel, so we need to mutate the FileDescriptor itself, and can't simply swap in a new one. I've raised http://b/4452981 to see if we can integrate the nio and io socket classes more closely, to avoid this kind of mess. Bug: 3107501 Change-Id: I4964b64c25e936a44d1e4c22504ca29bba247ab6
|
23ec09188303a874b3b391f96ae0a29af002bff9 |
|
19-May-2011 |
Elliott Hughes <enh@google.com> |
Implement recvfrom(2). This one's a little bit hairy because of multiple return values. Bug: 3107501 Change-Id: I3bd35647d94bb6bc2192d6f31a39ecca07a3926e
|
90d96a4f168b7e56cff54dc94dca2f3cde60ebcd |
|
17-May-2011 |
Elliott Hughes <enh@google.com> |
Add sendto(2) and reimplement all network writes in terms of it. Note that this doesn't fix http://b/4182806. Bug: 3107501 Change-Id: I9b56eae226389a63a12b4c0499d40d5a54a462e2
|
d4419fce71d11ec8494525eca65e54d1aab51de6 |
|
13-May-2011 |
Elliott Hughes <enh@google.com> |
Add getpwnam(3) and getpwuid(3). Bug: 3107501 Change-Id: I727029758fd495471a9103f6ba259f0a5410b0ab
|
396a9c666da353b910b515d12eb1c43adfddb0c8 |
|
13-May-2011 |
Elliott Hughes <enh@google.com> |
Expose getpid(2) and a bunch of its friends. Bug: 3107501 Change-Id: I71127752373abab67eea339b9afbea03148bece0
|
98b23d4d9894d21be1eacf498f48aeb707ca1e41 |
|
12-May-2011 |
Elliott Hughes <enh@google.com> |
Fix use of NULL references in poll. The first loop works out how many array elements are actually valid, but the second loop was going through the entire array, trying to copy from outside our allocation. This was introduced by a last-minute "harmless" change; previously the array was always exactly the right size by accident. Change-Id: I483299fd51b5758d0a998358106ee1e9a21c53b7
|
70c820401677ca251ad09ac64cc23c760764e75d |
|
12-May-2011 |
Elliott Hughes <enh@google.com> |
Expose poll(2) and reimplement java.nio.channels.Selector. This also adds UnsafeArrayList<T>, which is like ArrayList but lets you access the underlying array (as opposed to ArrayList.toArray which creates a copy). Bug: 3107501 Change-Id: I8dc570a9fd7951b1435047017ea7aa19f8f8fc53
|
e9f12043a1e2a29c60779cdb55c58eb156963570 |
|
11-May-2011 |
Elliott Hughes <enh@google.com> |
Add missing ScopedLocalRef usages. The one in RealToString is strictly unnecessary, but the other missing ones should have been there, and this seems like another instance of the "optional braces" anti-pattern: you should need a specific reason _not_ to have a ScopedLocalRef, and currently only our iovec code has such a reason (and it was already explicitly manipulating its local frame correctly). Change-Id: I24d4766a37bd9677db43da55b94da036a263c0c8
|
996bf79565ac88402920bd826d6f85952c83be20 |
|
10-May-2011 |
Elliott Hughes <enh@google.com> |
Expose connect(2). The new NET_FAILURE_RETRY in Posix.cpp is intended to replace the legacy one in NetFd.h, but during the transition we need both. The new one also takes care of the asynchronous Socket.close semantics, and changes the behavior when the FileDescriptor is invalid on entry: that is now reported as EBADF; it's only reported as "Socket closed" when we've been round the loop at least once, giving us reason to believe the socket was ever open. Having had to debug this distinction, I think the new semantics are less confusing. Bug: 3107501 Change-Id: I243dc4fa2eddde7ba40e9b66ec8fc555bc4e80f9
|
da15009528cc8300a6251f1d0931ac8657c9fc31 |
|
09-May-2011 |
Elliott Hughes <enh@google.com> |
Expose bind(2). I've renamed the java.net.InetAddress to struct sockaddr conversion functions too, after initially screwing up this patch by copy & pasting a usage of the one that only one caller actually wants. Now the name's so ugly no-one will be likely to use it by accident. Bug: 3107501 Change-Id: I869a8d27fc40e462505e02bf25a67e771a403e92
|
4664da5cfc3f22a633ca2c7013a97c08a42e6ba7 |
|
07-May-2011 |
Elliott Hughes <enh@google.com> |
Simplify our AF_INET/AF_INET6 address situation. Looks like there's just one special case (presentation to the user) where we want an Inet4Address to be an AF_INET sockaddr_in rather than an IPv4-mapped AF_INET6 sockaddr_in6. Change-Id: Ib3bcc9b69a0fc27c7348b97cc81fb326ba1d5d9d
|
1c039d71d3879f39e3a75b8788e656f7b4f88f08 |
|
05-May-2011 |
Elliott Hughes <enh@google.com> |
Add getaddrinfo(2). This only supports the "node" side of getaddrinfo(2), not the "service" side. There's also no support for AI_CANONNAME, so we currently return InetAddress[] rather than anything equivalent to C's linked list of struct addrinfo. Bug: 3107501 Change-Id: I8cf6baa3027a0fa05ac6e2f8fcc1dd8b576ff8c4
|
a5fb706fe4a6dbeaaf4cb1f8bbc2c68b0a2a3f3c |
|
29-Apr-2011 |
Elliott Hughes <enh@google.com> |
Add kill(2) to Libcore.os. Also kick the tires of ProcessManager, since we'll probably have to do some unrelated work in here soon. Bug: 3107501 Change-Id: I132c1e09d21ffcf0d5ea4aab93f04a36c1b30eaf
|
8dc754726bb5303c25e2c48decdf76d9323ee231 |
|
26-Apr-2011 |
Elliott Hughes <enh@google.com> |
Switch readv/writev over to ScopedBytes. Bug: 4343257 Change-Id: Ie966a07ce1e9eb73b71b5e5d9a6a54c201e91e48
|
0568a63ba1086a78ffb4cff68dd2eac4f9908e13 |
|
26-Apr-2011 |
Elliott Hughes <enh@google.com> |
Fix ByteBuffer.put(ByteBuffer). To do this tastefully required some cunning in the native code. The new ScopedBytesRO/ScopedBytesRW classes let us paper over the differences between byte[] and DirectByteBuffer, which in turn lets us paper over the differences between the various kinds of ByteBuffer. I've also rewritten Posix.read/Posix.readDirectBuffer and Posix.write/Posix.writeDirectBuffer to use the same idea. I haven't rewritten readv and writev, but can do and probably should. Bug: http://code.google.com/p/android/issues/detail?id=16184 Change-Id: Ia30d2f2fe1b1716a8f068187df2218b407a55aae
|
a37e971343883bb582a93ffbd9f0ba84f10e55ba |
|
21-Apr-2011 |
Elliott Hughes <enh@google.com> |
Rewrite NetworkInterface. This is part of the POSIX work, but also fixes a bug that asked for down interfaces to be returned. Additionally, I found a few bugs while rewriting this code. Most notably, we used to return a bogus broadcast address for the loopback interface. The only difference I notice between us and the RI when running on the host is that the RI claims that 127.0.0.1 has a prefix length of 0 rather than 8. I believe that we are correct on this issue. Bug: 4082343, 3107501 Change-Id: I677e0698e3a86676b4332b5d56fe514a99c3ddc0
|
4f11ebea266eada830d507b8f011e811a8e5d7bc |
|
20-Apr-2011 |
Elliott Hughes <enh@google.com> |
Add getnameinfo(3) (and gai_strerror(3)). There's quite a large corresponding change to InetAddress, plus I've changed the documentation for all the Permission classes to match the handful that we'd already documented as legacy cruft. Bug: http://b/3107501 Change-Id: Ia67aba79f0ab13e64085bd4a2df20ad0776bcc5b
|
b974666d79ebc392b37ec1ae83aae57ae6331c08 |
|
06-Apr-2011 |
Elliott Hughes <enh@google.com> |
Finish setsockopt(2). Bug: 3107501 Change-Id: I8f026dcba78acb555834bdcc594e114238f3cc52
|
438cb9e440d250c8aa5daf4fae0c400dce8b1499 |
|
02-Apr-2011 |
Elliott Hughes <enh@google.com> |
Add MCAST_JOIN_GROUP/MCAST_LEAVE_GROUP setsockopt(2). Bug: 3107501 Change-Id: I576f45f8c67b6172888bc0541e3d3a462bfa311a
|
c63f0d4e80a9fd3bdf99cd438d108b750226736a |
|
02-Apr-2011 |
Elliott Hughes <enh@google.com> |
Add more of setsockopt(2). This covers all the easy cases. I'll do the awkward ones separately. Bug: 3107501 Change-Id: Ie424290e0bef76516d0c57e9c077cb1c202381ad
|
0ade5524d972b9dfd69b0126aa4c35319c1b7fa4 |
|
31-Mar-2011 |
Elliott Hughes <enh@google.com> |
Fix an error in Posix.statfs and make sure we have test coverage. Bug: 3107501 Change-Id: Ib0ad8585d91ae4a440aec95fcd135c7f672d2367
|
0a9d1ee45a9884a9616624d747172e18734e8fe0 |
|
31-Mar-2011 |
Elliott Hughes <enh@google.com> |
Add getsockname(2) and getsockopt(2). Bug: 3107501 Change-Id: Ibb0d5a576ecb46e51dbda6051776145eec9e7fe1
|
462bdac45c10f43d88d8f07f6994e272a27c14a2 |
|
30-Mar-2011 |
Elliott Hughes <enh@google.com> |
Add close(2). This is sufficient for non-socket fds, but may need to change to support the asynchronous socket close monitor. (Hopefully not; I'd rather lift that into Java.) I've also changed the semantics of IoUtils.close to match those desired by all callers: ignore null/invalid FileDescriptors. Bug: 3107501 Change-Id: Iad5c31c8f0f34d2a5ab1ed4581509b46af28bd1f
|
454a95f6a28855aa3c88d168b15a45bf315efc99 |
|
30-Mar-2011 |
Elliott Hughes <enh@google.com> |
Add socket(2) and start adding setsockopt(2). I've added just enough setsockopt to keep the hack from our old socket creation code. More later (but not necessarily right away). Bug: 3107501 Change-Id: Id57bdd3c760bc58ed79d675b268c55493cbc24c8
|
8b15dcc5890963edad4dfcf558cc16027c7985e5 |
|
29-Mar-2011 |
Elliott Hughes <enh@google.com> |
Add sendfile(2). This patch marks the end of OSFileSystem. Having to support a Java "long*" for sendfile(2) gave me an opportunity to go back and improve my ioctl(2) to use a corresponding "int*" equivalent, instead of its previous special-case hack. Bug: 3107501 Change-Id: I9fde4777700552263fab4fe9aeb556174163e3dc
|
bbac92e691de7d570928ddfba639067978e55b06 |
|
29-Mar-2011 |
Elliott Hughes <enh@google.com> |
Add readv(2)/writev(2). The old implementation would cheat if it was given non-direct buffers, copying them into newly-allocated direct buffers. (The network Channel implementations are worse: they copy all the data into a single buffer, and then read/write that. I'll get to them eventually.) Bug: 3107501 Change-Id: I1655bacb042e7ebcde7e5bc5cf2c71e7ce5e30af
|
461d0d860814c68154d8dd06d24f94118f33d28a |
|
29-Mar-2011 |
Elliott Hughes <enh@google.com> |
Add ioctl(2) for int*. I'm not adding the "struct ifreq" stuff yet because that's really hairy and I plan on rewriting the NetworkInterface implementation anyway, so it'll mainly be based on /proc. With any luck, we won't even need those other ioctls then. I'm not sure _this_ ioctl is a good idea, but it does seem like a slight improvement on the old code, and we can always move it back out if/when these APIs become more public. Bug: 3107501 Change-Id: Iceac15e4a107c33bfc8795976a747c2ffa59a183
|
78c7cc547101002b9f9043cf3845970719d1bda8 |
|
26-Mar-2011 |
Elliott Hughes <enh@google.com> |
Add write(2). Note that this is a functional change, because the old code was wrong: it assumed that short writes don't happen. I thought we'd (I'd) cleaned this up just recently, but it looks like I must have only gone through the network code. Embarrassing. This also cleans up the previous read change a bit, factoring out a bit more duplication, and taking advantage of the fact that we now get decent exceptions thrown from invalid FileDescriptors (meaning we can remove explicit checks). Bug: 3107501 Change-Id: I8bd5324836c9d151dceaef5b84ec523a67391b64
|
26c7025a7a919044771fb89031161bd26fe03032 |
|
26-Mar-2011 |
Elliott Hughes <enh@google.com> |
Add read(2). For both byte[]s and ByteBuffers. Bug: 3107501 Change-Id: I93b781069ade4507371c8fe8c5fda0163fbb2dbb
|
fc549a0b0388987b26dea524894d75a63d14783b |
|
25-Mar-2011 |
Elliott Hughes <enh@google.com> |
Add fcntl(2). I initially used overloading, but that actually decreases safety in practice because which overload you need is (uniquely) determined by the specific command you're issuing. Forcing callers to explicitly state what they're doing works around this. As it was, I had to use strace(1) to find my bug. Bug: 3107501 Change-Id: Ia54b72dd6453372922f01b22f382eb93ac91aaa7
|
7341b9ed7157a1e37a3e69a0974676da358b735a |
|
24-Mar-2011 |
Elliott Hughes <enh@google.com> |
Add uname(2). This replaces InetAddress's use of gethostname(2), and System's hard-coded use of uname(2) itself. Bug: 3107501 Change-Id: I7e808177eece1e38428fea18a96c65628d51d93e
|
e1502d64e937001636fca3d62b2552ef2a34d05f |
|
24-Mar-2011 |
Elliott Hughes <enh@google.com> |
Add listen(2). Bug: 3107501 Change-Id: I3677bb4ddb3f3d0e58a6833165504f47bb309630
|
59e4744d27231f260271dbbca406e0cc39768116 |
|
24-Mar-2011 |
Elliott Hughes <enh@google.com> |
Add shutdown(2). Bug: 3107501 Change-Id: I30354c4cc6e86a4e7b0e3f84e95719539db1d297
|
41f0605d2c809bd9bc1c0fb68d86b49a0f59b6c5 |
|
24-Mar-2011 |
Elliott Hughes <enh@google.com> |
Add pipe(2). This lets us kill quite a bit of IoUtils. Bug: 3107501 Change-Id: Ic8a297b29cc53a17841cc77e266cd8dc3910c521
|
c7fa20701d5e9398c38f4615ed293acfce1c0cf6 |
|
24-Mar-2011 |
Elliott Hughes <enh@google.com> |
Add mkdir(2) and remove(2). Bug: 3107501 Change-Id: Ia4ca50b957d6015fa49076806273054563d25b63
|
b7190190e0ef8de883c952efb319ce7748831faa |
|
24-Mar-2011 |
Elliott Hughes <enh@google.com> |
Add chmod(2). Bug: 3107501 Change-Id: If3a0639634a90f607b8c6035f25b03d23e7261e0
|
59fa7163774d6930a174bc038414a4b780581957 |
|
23-Mar-2011 |
Elliott Hughes <enh@google.com> |
Add statfs(2). Bionic doesn't support statvfs(2), so we'll have to use statfs(2) in the meantime. We should fix this before making this API public, though. Bug: 3107501 Change-Id: I1af8a473261586321543dd1554e1f6079a84f384
|
a20cc6fca30d18e05db67ceeb0403b7b58ffd364 |
|
23-Mar-2011 |
Elliott Hughes <enh@google.com> |
Add rename(2) and symlink(2). And use them too. Bug: 3107501 Change-Id: I83b512a2553bfc2501d02c251a4649f8e670774e
|
0ac77ac8e915bff1a863e371f9b363033f9cf759 |
|
23-Mar-2011 |
Elliott Hughes <enh@google.com> |
Add open(2). Bug: 3107501 Change-Id: I404030b4c678862465d04f723a6a324663e0af25
|
0f746ff511162add42eeabaf14ba70ace874c6f4 |
|
23-Mar-2011 |
Elliott Hughes <enh@google.com> |
Add mincore(2). Bug: 3107501 Change-Id: Ibb288b0889ff47612f77870239f51928b35754a9
|
7e13c0f05ac9e7c55682d10e953dd4cbd5e6107c |
|
19-Mar-2011 |
Elliott Hughes <enh@google.com> |
Add mlock(2) and munlock(2). Bug: 3107501 Change-Id: I7e4cad36370196d990c709bfa33f89d7568aa453
|
7e25eff38a191d9c19e45093f4fde5102fb09d78 |
|
19-Mar-2011 |
Elliott Hughes <enh@google.com> |
Add mmap(2), msync(2), and munmap(2). Bug: 3107501 Change-Id: I6a7c4147ec27bab9ded280476bad1157ce03fab8
|
9a3f363523000704205df288f8b6f2f48c0d8563 |
|
19-Mar-2011 |
Elliott Hughes <enh@google.com> |
Add isatty(2). Bug: 3107501 Change-Id: I67e4a4ceeba945095419d176e7de5edb7da8a440
|
dedaccdfa07c370a58cba08b096133ad9eec0ec3 |
|
18-Mar-2011 |
Elliott Hughes <enh@google.com> |
Add lseek(2). Bug: 3107501 Change-Id: Ie27e2ae1c7d37de5f02b1d81ee2005182339f881
|
f5333fd2094bdac4d6506177b1964b79afa64d77 |
|
18-Mar-2011 |
Elliott Hughes <enh@google.com> |
Add ftruncate(2). The claim that "the port library" modifies the file offset appears to only ever have been true of Harmony's Win32 implementation. Certainly, this is not the behavior of ftruncate(2), so we can lose the cruft. Bug: 3107501 Change-Id: I35092fd986296b78c4847c7215765f9997339f37
|
6fc1a0e1e68dc2e0d12341548e58fa7f1c5dafc4 |
|
18-Mar-2011 |
Elliott Hughes <enh@google.com> |
Add sysconf(3). This gives us a getpagesize(3) replacement right now, and will let us implement Runtime.availableProcessors here rather than in the VM in a later change. Bug: 3107501 Change-Id: I6fc1f83d36b026fbe8d37eca525550479677f2de
|
47cb338d43f75dd998b29caaaa9446c5705217d1 |
|
18-Mar-2011 |
Elliott Hughes <enh@google.com> |
Add fstat(2), lstat(2), and stat(2). Bug: 3107501 Change-Id: Ic36f9ffd03446d6e0189470f42abdadde57327df
|
52724d3ebd4ccaaa4b9f5576e329d4272cde8ea9 |
|
17-Mar-2011 |
Elliott Hughes <enh@google.com> |
Add fsync(2) and fdatasync(2). Interesting parts to this change: * first BlockGuard support (and general delegation support). * first rethrowing of ErrnoException as IOException. * switching FileChannelImpl from int to FileDescriptor. The special case in FileDescriptor.sync has been removed. Testing with the RI showed that it doesn't treat syncing a FileDescriptor that corresponds to a socket as a special case --- it throws SyncFailedException just like normal. Bug: 3107501 Change-Id: I99faf120bd802aec0397a79772ed38c5e1542fed
|
ddfdbb9d172fe9b72e08e8d7deab0aa3b8acf044 |
|
17-Mar-2011 |
Elliott Hughes <enh@google.com> |
Add access(2), strerror(3) and access to environ. Update java.io.File and java.lang.System to use the new functionality rather than brewing their own. Bug: 3107501 Change-Id: I5fa63190d240d638f44a911401143ffb2af9d395
|
ec617e2cb4a374f0fd8fbda4a633214cf23a59a9 |
|
17-Mar-2011 |
Elliott Hughes <enh@google.com> |
Move the getenv(3) native code out of System as a demo. This is a fairly trivial patch, just to show the general structure. Bug: 3107501 Change-Id: I547df621ccb8b8874e5f74c4d0bcf84ccaef97c3
|