Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graceful stop in repeat mode - part 2 #833

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Commits on Feb 18, 2023

  1. Differentiate Lwt_unix platform at run time

    Lwt_unix does not implement all functions on Win32. Make it possible to
    differentiate the Lwt_unix implementation at run time to avoid calling
    unimplemented functions. Previously this differentiation was done by
    probing the compiler OS platform (Win32? with Cygwin?) but this is not
    reliable because it does not indicate the actual Lwt_unix implementation
    that's linked in.
    tleedjarv committed Feb 18, 2023
    Configuration menu
    Copy the full SHA
    114c696 View commit details
    Browse the repository at this point in the history
  2. Add graceful stop in repeat mode - stdin

    Add a new stop request method to terminate repeat mode. See commit
    e72c1c5.
    
    Monitor stdin to read any of the several stop conditions. Using stdin
    for checking the repeat mode stop request opens up a wide range of
    possibilities for the user, including manual and automated, local and
    remote.
    
    This method is usable only if stdin is an interactive terminal or is
    redirected from a readable source that is not a regular file.
    tleedjarv committed Feb 18, 2023
    Configuration menu
    Copy the full SHA
    a1bc7be View commit details
    Browse the repository at this point in the history
  3. Add graceful stop in repeat mode - Windows stdin

    Add a new stop request method to terminate repeat mode. See commit
    e72c1c5.
    
    Enable the method from commit a1bc7be
    to work in Windows.
    tleedjarv committed Feb 18, 2023
    Configuration menu
    Copy the full SHA
    1ae3db4 View commit details
    Browse the repository at this point in the history
  4. Add graceful stop in repeat mode - background job

    Improve the method from commit a1bc7be
    to allow Unison run as a background job in an interactive terminal.
    Reading from stdin while not a foreground process will normally result
    in the process being stopped (or receiving EIO if ignoring the stop
    signal).
    
    Do not attempt to read from stdin while not in foreground. Guard the
    process against being stopped when trying to read from stdin at the
    wrong moment.
    tleedjarv committed Feb 18, 2023
    Configuration menu
    Copy the full SHA
    95bc9f5 View commit details
    Browse the repository at this point in the history
  5. Add graceful stop in repeat mode - regular file

    Add a new stop request method to terminate repeat mode. See commit
    e72c1c5.
    
    Enable the method from commit a1bc7be
    to work with stdin redirected from a regular file.
    
    Regular files differ from other sources:
    
     - Since a regular file is always ready for reading, limit the reads to
       once a second.
    
     - Reaching EOF in a regular file is not considered a stop request. This
       enables the process to be started with input redirected from an empty
       file and then waiting for data to be written into the file.
    
     - To prevent reading massive amounts of data, only enable the regular
       file method if the file is initially empty or at most 32 bytes in
       size.
    tleedjarv committed Feb 18, 2023
    Configuration menu
    Copy the full SHA
    7a96641 View commit details
    Browse the repository at this point in the history
  6. Regen strings.ml

    tleedjarv committed Feb 18, 2023
    Configuration menu
    Copy the full SHA
    7ff6fa4 View commit details
    Browse the repository at this point in the history