From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 28482 invoked from network); 27 Jun 2020 17:13:37 -0000 Received: from ns1.primenet.com.au (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with ESMTPUTF8; 27 Jun 2020 17:13:37 -0000 Received: (qmail 14308 invoked by alias); 27 Jun 2020 17:13:32 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: Sender: zsh-workers@zsh.org X-Seq: 46148 Received: (qmail 15429 invoked by uid 1010); 27 Jun 2020 17:13:32 -0000 X-Qmail-Scanner-Diagnostics: from mail-io1-f45.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.3/25850. spamassassin: 3.4.4. Clear:RC:0(209.85.166.45):SA:0(-2.0/5.0):. Processed in 1.102779 secs); 27 Jun 2020 17:13:32 -0000 X-Envelope-From: roman.perepelitsa@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.166.45 as permitted sender) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=f87CXhVkm7DzvAJodTA/ZhuCqSyn7gQdpQ4Hg1dEJQ0=; b=D3RKk9+nhIT1241QOYx8sf0JiqNecoZ41xwAceklOjNrMB6WkTSKgvOb1Y8J+wwUgO uveZ4LYl6ZQp8kFxZHB4gAuUiZm1pnAsRPEcGPKGi4RXfIDP7pLicJ1lfEtqov4y/5j5 4Gp8BT/CniD/iB+OV4qUfzesgYBlew39uF0EsOW73r7DiLX5zpb3agnSjO4DpWAKlDGT GY51+fE01zAZzbNaSVWxzIto0aB83Mb+2Ibec7Mc/vM0E1R8bE5hpdZ6U5ULpXX1WKpG o24qaeMd6nZEZ6h44ieoUeiUsgwgU6tnGeXvePZWUMkgNyreLcI+Fow8XSUQCtn4aI1O UHYQ== X-Gm-Message-State: AOAM530wY3w3k7fCWmi2LuFdOOXhVRvbm6KeXm+eMW7vdVNx2zhK7XNF VPAWcc9dq5YZiBF7YamCkUiWC7w8blF/a7UeW4Y= X-Google-Smtp-Source: ABdhPJxkIrhbJeq1OyFfpWJAijarRqnuqe3bUnFpHjx8nOTEnqiWQzNAt2+cnUyK7FyZ1uiUhAGSMju17c2HWI8QbLg= X-Received: by 2002:a02:6c07:: with SMTP id w7mr9572409jab.33.1593277978271; Sat, 27 Jun 2020 10:12:58 -0700 (PDT) MIME-Version: 1.0 References: <20200626141644.7cb5e511@tarpaulin.shahaf.local2> <20200627014717.68986199@tarpaulin.shahaf.local2> <20200627071350.zqkdhzbk3mfej2tz@phare.normalesup.org> In-Reply-To: From: Roman Perepelitsa Date: Sat, 27 Jun 2020 19:12:46 +0200 Message-ID: Subject: Re: [BUG] zsystem:34: flock: invalid timeout value: '0' To: Bart Schaefer Cc: Cedric Ware , Daniel Shahaf , Sebastian Gniazdowski , Zsh hackers list Content-Type: text/plain; charset="UTF-8" On Sat, Jun 27, 2020 at 7:01 PM Bart Schaefer wrote: > > On Sat, Jun 27, 2020 at 12:27 AM Roman Perepelitsa wrote: >> >> Timeout strictly between 0 and 1 microsecond is not much different >> from timeout between 1 and 2 microseconds. You can either round up or >> down in both cases. Rounding up is the right thing to do for sleeps >> and timeouts because it allows you to provide a guarantee. > > I would be mildly surprised if this doesn't happen as part of the OS implementation of the operation. I've a tendency to use an overly direct language that's often perceived by others (especially Americans) as aggressive. Perhaps I was overcautious this time. Let me try again. Any implementation of sleep or timeout must round up. flock in zsh doesn't round up but it must. Roman.