aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/native
Commit message (Collapse)AuthorAge
* Put stdout and stderr streams into a consistent state when they are redirected.Gravatar Lukacs Berki2016-09-12
| | | | | | | Fixes #1755. -- MOS_MIGRATED_REVID=132861187
* Tentative fix for #1747.Gravatar Lukacs Berki2016-09-12
| | | | | | | The the theory is that the closing the file handle when the process terminates races with the reader threads, and if the closing happens not while a system call is running but between two, nativeReadStream() would return an error. -- MOS_MIGRATED_REVID=132851092
* Windows, JNI: use native isJunction method.Gravatar Laszlo Csomor2016-09-06
| | | | | | | Fixes https://github.com/bazelbuild/bazel/issues/1680 -- MOS_MIGRATED_REVID=132051176
* Windows, JNI: implement native isJunction method.Gravatar Laszlo Csomor2016-09-06
| | | | | | | WindowsFileSystem.java does not yet use it. -- MOS_MIGRATED_REVID=132043739
* Close stdout/stderr pipes when the main process of an action terminates so ↵Gravatar Lukacs Berki2016-09-01
| | | | | | | | | | | | | that we can properly finish reading from it even if it passed them on to a subprocess that did *not* terminate. The alternative would be to rely on job control. Fixes #1708. Hopefully. Tested by running test_cpp 10 times and observing that it doesn't hang. -- MOS_MIGRATED_REVID=131945117
* Windows, JNI: extract error reporting to a file.Gravatar Laszlo Csomor2016-08-31
| | | | | | | | | | | | | This change creates a separate file for GetLastErrorString and updates the BUILD file and windows_jni.dll builder script. A subsequent change will add a new source for file operations implemented in C++, so the BUILD file updates in this change are necessary preparations for that. -- MOS_MIGRATED_REVID=131804375
* Bazel shell scripts: fix links in licence comments.Gravatar Laszlo Csomor2016-08-24
| | | | | | | I suspect they were overwritten by an eager sed "s,//,#,g" command. -- MOS_MIGRATED_REVID=131159373
* Implement timeouts on Windows.Gravatar Lukacs Berki2016-08-22
| | | | | | | Makes #1664 much less acute. -- MOS_MIGRATED_REVID=130750731
* Rollback of commit f107debac45ddf5859b1eb963379769b5815b18f. Also includes ↵Gravatar Janak Ramakrishnan2016-08-12
| | | | | | | | | the logical rollback of commit 67ad82a319ff8959e69e774e7c15d3af904ec23d. RELNOTES[INC]: Bazel supports Unix domain sockets for communication between its client and server again, temporarily, while we diagnose a memory leak. -- MOS_MIGRATED_REVID=130027009
* Remove the AF_UNIX client/server communication protocol.Gravatar Lukacs Berki2016-08-05
| | | | | | | | | It has been superseded by gRPC. RELNOTES[INC]: Blaze doesn't support Unix domain sockets for communication between its client and server anymore. Therefore, the --command_port command line argument doesn't accept -1 as a valid value anymore. -- MOS_MIGRATED_REVID=129424092
* Fix various breakages in Windows process handling that creeped in because we ↵Gravatar Lukacs T. Berki2016-07-20
| | | | | | | | | | | | | | weren't actually running the test: - Call TerminateProcess() only if the process handle is still open - Update the tests so that they expect a return value of 0 when reading a stream from a non-existent process Fixes #1538 . -- Change-Id: I4de28abbba2e2e89f285d7b8fb75bcd9af345f14 Reviewed-on: https://bazel-review.googlesource.com/4100 MOS_MIGRATED_REVID=127935621
* Call TerminateProcess() is TerminateJobObject() fails.Gravatar Lukacs Berki2016-07-19
| | | | | | | This is to maintain some semblance of sanity on pre-Windows 8 systems where nested jobs are not supported. In that case, it's possible that the server is already in a job. -- MOS_MIGRATED_REVID=127810008
* Fix Windows tests.Gravatar Dmitry Lomov2016-07-15
| | | | | | | -- Change-Id: Ib480661ebbc522007edd77b374d6720d216b4508 Reviewed-on: https://bazel-review.googlesource.com/#/c/4050 MOS_MIGRATED_REVID=127534581
* Fix capturing stdin/stdout on Windows.Gravatar Dmitry Lomov2016-07-11
| | | | | | | | | | | 1. Return EOF for streams representing Windows process pipes. 2. Fix the timing of process.close() 3. Un-synchronized reading of stderr and stdout. -- Change-Id: Iec98f45db9984be2c2b066962801cbd3ca60da3f Reviewed-on: https://bazel-review.googlesource.com/#/c/4000/ MOS_MIGRATED_REVID=126910063
* Tweak Win32 process creation settings:Gravatar Lukacs Berki2016-07-07
| | | | | | | | - Use CREATE_NO_WINDOW instead of DETACHED_PROCESS (apparently, that's what we need) - Remove CREATE_BREAKAWAY_FROM_JOB. We now put the Bazel server into its own job that doesn't allow breakaway processes, so it's superfluous. -- MOS_MIGRATED_REVID=126791316
* Make Windows process management nicer.Gravatar Lukacs Berki2016-07-06
| | | | | | | | | Subprocesses now get killed if the Bazel server itself is killed and so do their subprocesses. Also implemented Subprocess#close() so that we get a little more control over when the native structures are cleaned up. -- MOS_MIGRATED_REVID=126628000
* Make the environment sanity check in nativeCreateProcess() consistent with ↵Gravatar Lukacs Berki2016-07-04
| | | | | | | | | what CreateProcess() does. Test cases don't need to be changed because this issue was caught by CreateProcess() instead. -- MOS_MIGRATED_REVID=126560893
* Add an implementation for SubprocessFactory based on the new JNI interface ↵Gravatar Lukacs Berki2016-07-04
| | | | | | | | | | | to Windows process management. With this change, Bazel can build itself using native Windows process management and Ctrl-C works in server mode as expected. Yay! Flipping the flag will come in a separate change that's easy to roll back if need be. -- MOS_MIGRATED_REVID=126408264
* Add native process management for Windows and its Java bindings (without a ↵Gravatar Lukacs Berki2016-07-01
| | | | | | | sane Java API for now) -- MOS_MIGRATED_REVID=126306559
* Do not be satisfied with a JRE when looking for JNI headers.Gravatar Lukacs Berki2016-06-29
| | | | | -- MOS_MIGRATED_REVID=126076585
* Make "bazel info server_pid" work on Windows.Gravatar Lukacs Berki2016-06-29
| | | | | | | | | This is the first actual use of Windows JNI! Also a cleanup of ProcessUtils. Injecting a mock implementation was never used. -- MOS_MIGRATED_REVID=126068832
* Add build_windows_jni.sh to the repository.Gravatar Lukacs Berki2016-06-27
| | | | | -- MOS_MIGRATED_REVID=125972319
* Add skeleton code for a JNI .DLL on Windows.Gravatar Lukacs T. Berki2016-06-27
| | | | | | | | | Tested by hacking in a call to a JNI method into BatchMain.java . -- Change-Id: I77b0731fa6b81f8cbc80cf2a31d427764fad6ad1 Reviewed-on: https://bazel-review.googlesource.com/#/c/3908/ MOS_MIGRATED_REVID=125955521
* Set output_to_bindir to 1 for libunix.dylibGravatar Damien Martin-Guillerez2016-06-21
| | | | | | | This is needed for generate_workspace to behave correctly on OS X, see https://bazel-review.googlesource.com/#/c/3460. -- MOS_MIGRATED_REVID=125428956
* Add support for xattr to Darwin.Gravatar Dave MacLachlan2016-06-15
| | | | | -- MOS_MIGRATED_REVID=124938322
* Fix delete[] warning on fsevents.ccGravatar Damien Martin-Guillerez2016-06-08
| | | | | | | Fixes #1347. -- MOS_MIGRATED_REVID=124330246
* Introduce FsEventsDiffAwareness for OS X.Gravatar Damien Martin-Guillerez2016-06-02
| | | | | | | | | | | | | | | | | Use FsEvents API (https://developer.apple.com/library/mac/documentation/Darwin/Reference/FSEvents_Ref) to watch the file system. This change also refactor the LocalDiffAwareness to extract the WatchService specific part. It now select the FsEventsDiffAwareness on OSX and the WatchServiceDiffAwareness on Linux. RELNOTES[NEW]: On OSX, --watchfs now uses FsEvents to be notified of changes from the filesystem (previously, this flag had no effect on OS X). Fixes #1074. -- Change-Id: I927951468e4543a399e0e0ad0f1dd23d38ce15a0 Reviewed-on: https://bazel-review.googlesource.com/3420 MOS_MIGRATED_REVID=123854017
* Uses long in portable_sysctlbyname instead of jlong. Fixes #1249. Fixes #1254.Gravatar Yue Gan2016-05-16
| | | | | -- MOS_MIGRATED_REVID=122257999
* Fix build on FreeBSD (again).Gravatar Piotr Sikora2016-04-12
| | | | | | | | | | Broken by commit a6ae3e7a, which added sysctlbyname() without required headers. While there, remove unused PATH_MAX2. -- MOS_MIGRATED_REVID=119619207
* Add SMT detection for mac. Fixes #963.Gravatar Yue Gan2016-04-05
| | | | | | | -- Change-Id: Ib83af0d0a04dc6b173bef1df28d17abc7a3c824d Reviewed-on: https://bazel-review.googlesource.com/#/c/3120/ MOS_MIGRATED_REVID=119027507
* Add a bazel-srcs target to the top-level package containing all Bazel sourcesGravatar Damien Martin-Guillerez2016-02-29
| | | | | | | | This target include all non tests targets of Bazel to do integration tests of bootstrapping. -- MOS_MIGRATED_REVID=115830741
* Reference #914 from a comment describing a hack.Gravatar Julio Merino2016-02-17
| | | | | -- MOS_MIGRATED_REVID=114854807
* Rename FilesystemUtils to NativePosixFiles.Gravatar Lukacs Berki2016-01-27
| | | | | | | This helps avoid confusion with File*S*ystemUtils, which differs in only the case of a character but is a completely different class. -- MOS_MIGRATED_REVID=113054116
* Augment JNI utime() method.Gravatar Eric Fellheimer2015-10-30
| | | | | -- MOS_MIGRATED_REVID=106634616
* handle darwin_x86_64 target cpuGravatar Chris Parsons2015-10-30
| | | | | -- MOS_MIGRATED_REVID=106605250
* Introduce Path#isSpecialFile, FileSystem#isSpecialFile, and ↵Gravatar Nathan Harmata2015-10-21
| | | | | | | FileStatus#isSpecialFile to help disambiguate between a regular file and a special file, since the file size of a special file cannot be trusted. -- MOS_MIGRATED_REVID=105903622
* Rationalize copyright headersGravatar Damien Martin-Guillerez2015-09-25
| | | | | | | | | | | The headers were modified with `find . -type f -exec 'sed' '-Ei' 's|Copyright 201([45]) Google|Copyright 201\1 The Bazel Authors|' '{}' ';'` And manual edit for not Google owned copyright. Because of the nature of ijar, I did not modified the header of file owned by Alan Donovan. The list of authors were extracted from the git log. It is missing older Google contributors that can be added on-demand. -- MOS_MIGRATED_REVID=103938715
* Port to FreeBSD.Gravatar Doug Rabson2015-08-26
| | | | | | | -- Change-Id: I4e65cc583e758d2f7e45209ffcb37f6a871e2ed7 Reviewed-on: https://bazel-review.git.corp.google.com/#/c/1840 MOS_MIGRATED_REVID=101462155
* Fix some missing headers and data dependencies in BUILD files.Gravatar Philipp Wollermann2015-08-24
| | | | | -- MOS_MIGRATED_REVID=101218746
* Fix some C++ compiler warnings to comply with -Wall.Gravatar Ulf Adams2015-07-27
| | | | | | | | | Some progress towards #311. -- Change-Id: I9276519d4a97d358b7c4f4e34a861522d75dd495 Reviewed-on: https://bazel-review.googlesource.com/#/c/1710 MOS_MIGRATED_REVID=99019961
* Add a BUILD file to src/main/cpp/util.Gravatar Ulf Adams2015-07-23
| | | | | -- MOS_MIGRATED_REVID=98918607
* Rollback of commit 73ad1482a1d99b9acd14f4545ff11671d87ec4e1.Gravatar Kristina Chodorow2015-05-27
| | | | | | | | | | | | | | | *** Reason for rollback *** stat64 is deprecated and causes compiler warnings on OS X *** Original change description *** Switch to stat64/lstat64 Better fix for #174. -- MOS_MIGRATED_REVID=94482625
* Update include guards.Gravatar Han-Wen Nienhuys2015-05-15
| | | | | -- MOS_MIGRATED_REVID=93413161
* Switch to stat64/lstat64Gravatar Kristina Chodorow2015-05-08
| | | | | | | Better fix for #174. -- MOS_MIGRATED_REVID=93045666
* Fix JNI on 32-bit systemsGravatar Kristina Chodorow2015-05-08
| | | | | | | | | | | | | | The stat struct's size field is off_t, which varies in size between 32- and 64-bit systems. The size field in FileStatus.java is a long (which in Java is always 64 bits) so the size is getting initialized incorrectly. I can't think of a good way to add this to our integration tests, but I've tested in manually on a VM. Fixes #174. -- MOS_MIGRATED_REVID=93038537
* Header cleanups.Gravatar Han-Wen Nienhuys2015-04-22
| | | | | -- MOS_MIGRATED_REVID=91681168
* Use the constant length from Md5Digest API.Gravatar Thiago Farina2015-04-01
| | | | | | -- Change-Id: I97b35fa8d49e31724bddf33ad1f25834bfc67e32 MOS_MIGRATED_REVID=90078101
* Fixed the broken build caused by missing includes.Gravatar Jie Yu2015-04-01
| | | | | -- MOS_MIGRATED_REVID=90055230
* Allow external contributions on src/main/nativeGravatar Damien Martin-Guillerez2015-04-01
| | | | | -- MOS_MIGRATED_REVID=90050516
* Implemented an partial emulation of fstatat for OS XGravatar Damien Martin-Guillerez2015-03-24
| | | | | | | | | | fstatat does not exists under OS X and it was replaced by a dummy stub. This resulted in symlinks being seen as unknown file type when reading directory entries. Ultimately, this leads to the inability to glob symlinks under OS X. -- MOS_MIGRATED_REVID=89304190