Michal Terepeta
4237fda6a5
Check for IN_MODIFY in file_system_watcher_linux.cc
...
This allows to detect changes to a file due to `write` or `truncate`
syscalls.
Change-Id: I095d842367a56121cd87c2176dde0a4feb5e3d7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161177
Reviewed-by: Alexander Aprelev <aam@google.com >
Commit-Queue: Alexander Aprelev <aam@google.com >
Auto-Submit: Michal Terepeta <michalt@google.com >
2020-09-08 17:57:45 +00:00
Alexander Aprelev
8793e5aa01
Reland "[vm/io] Fix FileSystemWatcher enum name typo."
...
This reverts commit 34f636ce1d with the fix for the typo in patchset 2.
Change-Id: I419528f866f6edb707ca586f21a2a8c7f09323d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161620
Reviewed-by: Ryan Macnak <rmacnak@google.com >
Commit-Queue: Alexander Aprelev <aam@google.com >
2020-09-02 20:41:32 +00:00
Alexander Markov
34f636ce1d
Revert "[vm/io] Fix FileSystemWatcher enum name typo."
...
This reverts commit 0a036db596 .
Reason for revert: build fails on android.
Original change's description:
> [vm/io] Fix FileSystemWatcher enum name typo.
>
> Change-Id: Ie9f2e10847caf794ddc79229ce7bd35a3909896d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161600
> Reviewed-by: Ryan Macnak <rmacnak@google.com >
> Commit-Queue: Alexander Aprelev <aam@google.com >
TBR=aam@google.com ,rmacnak@google.com
Change-Id: Ibffe96077dacd6f7f9c8b383703d77b416a0cf20
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161605
Reviewed-by: Alexander Markov <alexmarkov@google.com >
Commit-Queue: Alexander Markov <alexmarkov@google.com >
2020-09-02 19:05:35 +00:00
Alexander Aprelev
0a036db596
[vm/io] Fix FileSystemWatcher enum name typo.
...
Change-Id: Ie9f2e10847caf794ddc79229ce7bd35a3909896d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161600
Reviewed-by: Ryan Macnak <rmacnak@google.com >
Commit-Queue: Alexander Aprelev <aam@google.com >
2020-09-02 17:21:47 +00:00
Martin Kustermann
a64b06ec83
[gardening] Migrate most files to be implicit-bool-conversion free
...
Issue https://dart-review.googlesource.com/c/sdk/+/115701
Change-Id: Ib579f0bbc8d694aec74afd837217316a10baf910
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115707
Commit-Queue: Martin Kustermann <kustermann@google.com >
Reviewed-by: Ryan Macnak <rmacnak@google.com >
Reviewed-by: Daco Harkes <dacoharkes@google.com >
2019-09-05 21:41:42 +00:00
Zach Anderson
27c79f9459
[vm] Propagate more UTF8 conversion errors
...
Change-Id: I8d4f3a892a51bed8b922961bd74bcad727f66508
Reviewed-on: https://dart-review.googlesource.com/73280
Commit-Queue: Zach Anderson <zra@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
Reviewed-by: Siva Annamalai <asiva@google.com >
2018-09-06 02:23:21 +00:00
Zachary Anderson
d0295c873c
[dart:io] Namespaces for file IO
...
Fuchsia requires the ability to sandbox Isolates w.r.t. file IO.
When a new Isolate starts, Fuchsia will pass the Isolate an object
called a namespace. We can translate the namespace object into a
file descriptor suitable for passing to the *at() family of
POSIX file system calls. The file system calls will then
have visibility only into the specified namespace.
We also plumb Namespaces through on all the other platforms as well to
make the change easier to test and so that in the future we can
implement e.g. per-isolate cwds.
This change adds a new internal class to dart:io called _Namespace,
which is implemented in a patch file. See:
sdk/lib/io/namespace_impl.dart
runtime/bin/namespace_patch.dart
The embedder can set up a non-default namespace by calling
_Namespace._setupNamespace during Isolate setup.
Instances of _Namespace have a native field that holds a pointer
to a native Namespace object. See:
runtime/bin/namespace.h
Calls from e.g. file_impl.dart are now also passed a
_Namespace object. The implementations in e.g. file.cc and
file_linux.cc then extract the namespace, and use it to compute a
file descriptor and path suitable for passing to e.g. openat().
related US-313
R=asiva@google.com , rmacnak@google.com
Review-Url: https://codereview.chromium.org/3007703002 .
2017-08-30 09:34:36 -07:00
Zachary Anderson
747868f2b1
[dart:io] Remove DART_IO_DISABLED
...
This was only used by Dartium.
Review-Url: https://codereview.chromium.org/3009523002 .
2017-08-24 11:17:52 -07:00
Zachary Anderson
6cd8a79078
VM: Re-format to use at most one newline between functions
...
R=asiva@google.com
Review-Url: https://codereview.chromium.org/2974233002 .
2017-07-13 08:08:37 -07:00
Zachary Anderson
bdb4eb6338
[dart:io][windows] Implements RawSynchronousSocket
...
related #29343
fixes #29333
R=asiva@google.com
Review-Url: https://codereview.chromium.org/2830273002 .
2017-04-21 23:29:52 -07:00
Ben Konyi
ddc4f30d75
Re-land socket refactor with fixes for Windows.
...
BUG=
R=zra@google.com
Review-Url: https://codereview.chromium.org/2797993005 .
2017-04-05 12:45:31 -07:00
Ben Konyi
0386f7ab6f
Reverting until bots clear up.
...
Revert "Pulled a significant portion of Socket implementation into BaseSocket in order to prepare for the synchronous socket impementations which will also use these common methods."
This reverts commit 0422920142 .
Revert "Updated incorrect call to Write in process_win.cc"
This reverts commit 9e1435148b .
Revert "Fixed incorrect call to Write from process_win.cc"
This reverts commit 11dcab2bed3c9ec8ec76bc200206ac202a4a5681.
Fixed incorrect call to Write from process_win.cc
BUG=
Review-Url: https://codereview.chromium.org/2791163004 .
2017-04-03 17:25:47 -07:00
Ben Konyi
0422920142
Pulled a significant portion of Socket implementation into BaseSocket in order to prepare for the synchronous socket impementations which will also use these common methods.
...
BUG=
R=zra@google.com
Review-Url: https://codereview.chromium.org/2780063002 .
2017-04-03 17:05:11 -07:00
Ryan Macnak
877284947b
Rename TARGET_OS_* to HOST_OS_*.
...
Like HOST_ARCH_*, HOST_OS_* describes the OS the VM is running on, which may be different from the OS the VM is generating code for during AOT compilation.
Currently we conflate the two when emitting AOT as assembly, and we get away with it because Flutter only uses assembly for targeting iOS and one can only target iOS from a Mac, but we expect to use assembly for Android as well so native tools can unwind Dart frames.
R=zra@google.com
Review-Url: https://codereview.chromium.org/2750843003 .
2017-03-15 13:11:05 -07:00
Zachary Anderson
479a97b129
clang-format runtime/bin
...
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/2480793002 .
2016-11-04 12:30:56 -07:00
Zachary Anderson
e29da6037b
Small cleanups and linter fixes.
...
Review URL: https://codereview.chromium.org/2455983002 .
2016-10-27 05:02:20 -07:00
Zachary Anderson
7308e58c3f
Really remove io support when dart:io is unsupported.
...
Previously we would compile in implementaitions of native calls for
IO functions that would never be used. This CL provides implementations
that throw a Dart exception if they're called by mistake. It also uses
a DART_IO_DISABLED preprocessor define to clean up the build files and
check that we're not including code we shouldn't.
R=iposva@google.com , johnmccutchan@google.com
Review URL: https://codereview.chromium.org/1839463002 .
2016-03-29 11:22:03 -07:00
Zachary Anderson
45661a7091
Cleanup in //runtime/bin
...
R=iposva@google.com
Review URL: https://codereview.chromium.org/1800863002 .
2016-03-16 10:01:00 -07:00
sgjesse@google.com
0518874077
Add error handling when initializing the file system watcher
...
R=kustermann@google.com , wibling@google.com
BUG=
Review URL: https://codereview.chromium.org//939643002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43838 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-18 13:20:15 +00:00
ajohnsen@google.com
0c157cd31e
Move signal_blocker to platform and use it by default in TEMP_FAILURE_RETRY.
...
BUG=http://code.google.com/p/dart/issues/detail?id=16927
R=johnmccutchan@google.com , sgjesse@google.com
Review URL: https://codereview.chromium.org//165723007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33745 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-17 13:51:11 +00:00
ajohnsen@google.com
140fddd06e
Make event-handlers edge-triggered and move socket-state to Dart.
...
This eliminates to pause/resume calls made in the previous one-shot based model.
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//169383003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32780 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-19 09:44:26 +00:00
ajohnsen@google.com
abdc2ade9d
Rewrite file-system-watcher to better handle the different system APIs.
...
BUG=http://code.google.com/p/dart/issues/detail?id=14941
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//98773002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30848 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-04 10:35:00 +00:00
ajohnsen@google.com
60ee24e8d1
Make FileSystemWatcher work on MIPS and make watching on android the same as linux.
...
BUG=https://code.google.com/p/dart/issues/detail?id=13553
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//48493003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29548 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 14:17:29 +00:00
ajohnsen@google.com
e70ae87df1
Fire event and close the stream when the watched directory is moved.
...
BUG=https://code.google.com/p/dart/issues/detail?id=14598
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//52123002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29532 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 11:35:33 +00:00
ajohnsen@google.com
2101ba9c12
Add 'isDir' to FileSystemEvent.
...
BUG=https://code.google.com/p/dart/issues/detail?id=14425
R=whesse@google.com
Review URL: https://codereview.chromium.org//48613002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29371 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-28 17:14:43 +00:00
ajohnsen@google.com
93cfb622a7
Only listen to full writes, not incremental file changes, in file system watch.
...
BUG=https://code.google.com/p/dart/issues/detail?id=14372
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//48183003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29360 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-28 13:23:13 +00:00
ajohnsen@google.com
483228ef66
If a move has matching target/destination, signal the event as create or delete.
...
BUG=https://code.google.com/p/dart/issues/detail?id=14424
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//48513003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29354 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-28 12:07:46 +00:00
ajohnsen@google.com
fdea26c768
Close file watcher when target is deleted.
...
BUG=http://code.google.com/p/dart/issues/detail?id=14374
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//39613002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29159 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-24 08:12:16 +00:00
ajohnsen@google.com
7c53dfaf3f
Make file system watcher compile on Mac OS 106, and add a runtime-call to test if the system supports the feature.
...
BUG=
R=kustermann@google.com , sgjesse@google.com
Review URL: https://codereview.chromium.org//23483030
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27064 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-03 15:42:02 +00:00
ajohnsen@google.com
38bae0af02
Add FileSystemWatcher class to dart:io.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//19263003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27048 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-03 12:43:08 +00:00