• Christopher Fujino's avatar
    [flutter_tools] catch SocketException writing to ios-deploy stdin (#139784) · fac41dde
    Christopher Fujino authored
    Fixes https://github.com/flutter/flutter/issues/139709
    
    This adds a static helper method `ProcessUtils.writelnToStdinGuarded()`, which will asynchronously write to a sub-process's STDIN `IOSink` and catch errors.
    
    In talking with Brian, it sounds like this is the best and most reliable way to catch `SocketException`s during these writes *to sub-process file descriptors* specifically (with a "real" hard drive file, the future returned by `.flush()` should complete with the write error).
    
    Also, as I note in the dartdoc to `writelnToStdinGuarded()`, the behavior seems to be different between macOS and linux.
    
    Moving forward, in any place where we want to catch exceptions writing to STDIN, we will want to use this new helper.
    fac41dde
Name
Last commit
Last update
..
analyze_size.dart Loading commit data...
async_guard.dart Loading commit data...
bot_detector.dart Loading commit data...
build.dart Loading commit data...
command_help.dart Loading commit data...
common.dart Loading commit data...
config.dart Loading commit data...
context.dart Loading commit data...
dds.dart Loading commit data...
deferred_component.dart Loading commit data...
error_handling_io.dart Loading commit data...
file_system.dart Loading commit data...
fingerprint.dart Loading commit data...
io.dart Loading commit data...
logger.dart Loading commit data...
multi_root_file_system.dart Loading commit data...
net.dart Loading commit data...
os.dart Loading commit data...
platform.dart Loading commit data...
process.dart Loading commit data...
project_migrator.dart Loading commit data...
signals.dart Loading commit data...
task_queue.dart Loading commit data...
template.dart Loading commit data...
terminal.dart Loading commit data...
time.dart Loading commit data...
user_messages.dart Loading commit data...
utils.dart Loading commit data...
version.dart Loading commit data...
version_range.dart Loading commit data...