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=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 29809 invoked from network); 26 Apr 2022 04:20:59 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 26 Apr 2022 04:20:59 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1650946859; b=U7oec0TbDxEz96GYrfD/Lq3bjAzdiQJ3+rkVJlKsLTDrDbVaJjaKhya8A+rn7iEqCy35IpYZgg CB70kw4hlgPVfRWtLzYtOsZtaPc1jPMw2pJ3fBaw3SjZBLBB+S2OyK0f/zPkaW3TnguSbBGkVd 9C/jrbE7LyzlwrsjcUctAjVndfGvADb9L+Z4Ee5ZvvjmBul7YZCpLWAAeIlxseMU7z1GKhfjSe Qt/ymQGWHmjFBEcG5DeBOlx3aZCjSN1XEmIFPz+vLslMT4fhg47etc0v3/eZDv+ykufLqUsfMr TeCA2heWjvzsrj3CnMk2VZfk3BNjFh8zHJ+5J/zNCun3Lg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ej1-f54.google.com) smtp.remote-ip=209.85.218.54; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1650946859; bh=rHxQm0aSoQwfpHmBlF6j7rxAojdWrUxdXEkjhlfYpNU=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:To:Subject:Message-ID:Date:From:MIME-Version: DKIM-Signature:DKIM-Signature; b=cKgzZ174UPVvfpM2CcrP/IZbcUVcaPiVhv3rvaYV1yCfY81H3DcCpGwB+7NjNEvVQhDWOe+Mnc CeDGciav8MdDet8zDD2Zq02dX5HghcvUI/80y7NfvvCZfNQIsFCtHzqlZNp1DxvlxQas4WvqpH X8mklZSqwyjQ/+/qYBaG1DpHn+D/0mSXNlO70JeaVaaOZkDXGVpUHa0H8sE2VA94CkgqvIctJS ZaPV/sPhG6BKSy3GFlij7oYYR9R+mrfU78l5hr0IP0txXpEiNnedpM1PQBo5sTg+WDm8qBjisZ HSUWdsSuRFiiJoRBJWCEeTFbUmmngrYkDg1fzrvdBqhpVw==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:To:Subject:Message-ID: Date:From:MIME-Version:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References; bh=jTs3uHTIMtKPvClnzxoWLavd+Sc9HCrK/N9m2foomXE=; b=pVfVCIGMWV4aFP9MbgDkjgYua0 sZz4/RJgrx4ln5BYWqOM1bXhIPbwWGwCvx78COeD+DfTMcdF9X7Y4vbUM2F8q/WpWyOeZgP0jDLXk QP1toVq3m576m6H0JYV3gU4iNn6qqm8jeal6+0FMWo9PB/n3sb/PpyGzKZDSlD8kyg9hZRcgxDSO8 zy05rxs8Cq/o6bbImao8Epp5Zy4iCbS0DQPQKAnSwUsi2XshpFa/y7q6b4P88xmIq/iSOjQpYVKj9 CkcDZMhrRETmyY0HpoN1HspLcySvD42ysGzZdXlb6pV9Iauk04FO9BzSI5I9gW9tJvTiOwo847cOX 5lgtUe4A==; Received: from authenticated user by zero.zsh.org with local id 1njCh8-0005f0-Tt; Tue, 26 Apr 2022 04:20:59 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ej1-f54.google.com) smtp.remote-ip=209.85.218.54; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ej1-f54.google.com ([209.85.218.54]:39922) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1njCgt-0005Kl-NZ; Tue, 26 Apr 2022 04:20:44 +0000 Received: by mail-ej1-f54.google.com with SMTP id bv19so33529637ejb.6 for ; Mon, 25 Apr 2022 21:20:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20210112.gappssmtp.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=jTs3uHTIMtKPvClnzxoWLavd+Sc9HCrK/N9m2foomXE=; b=bIjfsZpAV2SEDyUSSwjkwczig7/mv5jR7rSPmLpsvGZLfHmuJTgmUdyL+pHv7ZKJxW zIYT+2ZbY4z7PJeSSEyq1Cr6xmY066SsvbSr+OI4aVyM2+jydWMUWx3WYnwiFNa2OJYB CoVGvBWSNR+atrnxta3g0sYaEflVrx4U+u+G/VWKXkCNFRZ0qT18av0cKfZL/qlLoaM0 QEse3ZyrS2VcTn3ReVAnVONxIhkJhX6XlruJPY9Gtp8R2mPtf/VkIWhk1SHikp5Qikn8 DudiUTfPrSNEUUHhpHE5EKamd+4sUx1TzBURkx69UY/Bjmg3HAe9MyOoiNAOhBPMlrh4 85KQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=jTs3uHTIMtKPvClnzxoWLavd+Sc9HCrK/N9m2foomXE=; b=qqKM9ewMn2Jmg7W2YauLGh6D5b59EH3gld+PAiXu9KRadLp7xoJP9P5nRYXU8zagc6 +WrxiDR58WllT5Aju3yYm6NO4dC53nvd2g6wLrAF7v/DFwW4cKd25JFvdEuOrwjWl74x qrTy3HT8uy1XwZaZI/AZwIS3iEJ0Er/9+1SzCvbxLFFF0Iz3HmGfYUADPM4wsyMU9PU0 nkmyuhZPKqD8BNNRj8R6oP0Ro6Spmb0Mg8f+FJo8QOMOCB7rWNWhWbMtdrrX+6MaOLDY EqAYkmOFdLtp3Krds6wYe617xRvVyeMe11Gc6vjWmUv6hAoDvgGFEz3/lBZ8cGDeIz1a Qa0A== X-Gm-Message-State: AOAM530bN2IY6XLiP9hE0f6wy31TgugYkp7TyJilIIizHCqa2CwKXav+ 1yCWFqPzWPJl7j7aqYlEEEtbPqP1xTyrBx2R+TvpwStJIed4+l1V X-Google-Smtp-Source: ABdhPJyGvDFsh8bZuJbVtiCIvkNkbSQx3XmfAnX+L19JqfRXN7RFOhfsOZ4LPiKoNODccX5Wu7a1dxB2BEwrC2nRlzU= X-Received: by 2002:a17:907:60cc:b0:6da:9616:ecec with SMTP id hv12-20020a17090760cc00b006da9616ececmr20462829ejc.298.1650946843460; Mon, 25 Apr 2022 21:20:43 -0700 (PDT) MIME-Version: 1.0 From: Bart Schaefer Date: Mon, 25 Apr 2022 21:20:32 -0700 Message-ID: Subject: [PATCH?] zsh/system module: sysread -o: Doc confusion? To: Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 50101 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: If OUTFD is given, an attempt is made to write all the bytes just read to the file descriptor OUTFD. If this fails, because of a system error other than EINTR or because of an internal zsh error during an interrupt, the bytes read but not written are stored in the parameter named by PARAM if supplied (no default is used in this case), and the number of bytes read but not written is stored in the parameter named by COUNTVAR if that is supplied. Yet: sysread -t 1 -i 0 -c countvar -o 2 param zsh:sysread:1: no argument allowed with -o I'm guessing we want the code to conform to the doc, and not the opposite? diff --git a/Src/Modules/system.c b/Src/Modules/system.c index 71745548f..ea11ef037 100644 --- a/Src/Modules/system.c +++ b/Src/Modules/system.c @@ -83,10 +83,6 @@ bin_sysread(char *nam, char **args, Options ops, UNUSED(int func)) /* -o: output file descriptor, else store in REPLY */ if (OPT_ISSET(ops, 'o')) { - if (*args) { - zwarnnam(nam, "no argument allowed with -o"); - return 1; - } outfd = getposint(OPT_ARG(ops, 'o'), nam); if (outfd < 0) return 1;