X-Loop: help-debbugs@HIDDEN Subject: bug#30928: no error val returned by 'nice' failure? Resent-From: L A Walsh <coreutils@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-coreutils@HIDDEN Resent-Date: Sat, 24 Mar 2018 19:50:02 +0000 Resent-Message-ID: <handler.30928.B.152192094229890 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 30928 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: 30928 <at> debbugs.gnu.org X-Debbugs-Original-To: bug-coreutils@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.152192094229890 (code B ref -1); Sat, 24 Mar 2018 19:50:02 +0000 Received: (at submit) by debbugs.gnu.org; 24 Mar 2018 19:49:02 +0000 Received: from localhost ([127.0.0.1]:51776 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1ezp9x-0007lz-UW for submit <at> debbugs.gnu.org; Sat, 24 Mar 2018 15:49:02 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41655) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <coreutils@HIDDEN>) id 1ezp9w-0007lj-29 for submit <at> debbugs.gnu.org; Sat, 24 Mar 2018 15:49:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <coreutils@HIDDEN>) id 1ezp8m-0002YV-Pu for submit <at> debbugs.gnu.org; Sat, 24 Mar 2018 15:48:54 -0400 Received: from lists.gnu.org ([2001:4830:134:3::11]:58458) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <coreutils@HIDDEN>) id 1ezp8m-0002YH-ME for submit <at> debbugs.gnu.org; Sat, 24 Mar 2018 15:47:48 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57350) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <coreutils@HIDDEN>) id 1ezp4b-00032l-J8 for bug-coreutils@HIDDEN; Sat, 24 Mar 2018 15:47:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <coreutils@HIDDEN>) id 1ezoyb-0005DJ-M9 for bug-coreutils@HIDDEN; Sat, 24 Mar 2018 15:38:23 -0400 Received: from ishtar.tlinx.org ([173.164.175.65]:41422 helo=Ishtar.sc.tlinx.org) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <coreutils@HIDDEN>) id 1ezoyb-0005AU-C9 for bug-coreutils@HIDDEN; Sat, 24 Mar 2018 15:37:17 -0400 Received: from [192.168.3.12] (Athenae [192.168.3.12]) by Ishtar.sc.tlinx.org (8.14.7/8.14.4/SuSE Linux 0.8) with ESMTP id w2OJbADB087122 for <bug-coreutils@HIDDEN>; Sat, 24 Mar 2018 12:37:13 -0700 Message-ID: <5AB6A8E6.2090606@HIDDEN> Date: Sat, 24 Mar 2018 12:37:10 -0700 From: L A Walsh <coreutils@HIDDEN> User-Agent: Thunderbird MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -5.0 (-----) I executed a command: nice --19 sleep 5 and hoped to get back a status as to whether or not I was allowed to use a negative priority, since on Windows, anyone in the Admin group can set a priority, with the above command running sleep at 'High' priority, but on linux: > nice --19 sleep 1 nice --19 sleep 1 nice: cannot set niceness: Permission denied > echo $? 0 nice has an error setting the priority, but doesn't set any status in the return code. Shouldn't nice's exit value be something like EPERM if it couldn't set the priority -- whether or not it executed the command... Otherwise, how do you tell if the resetting of the priority worked or failed?
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: L A Walsh <coreutils@HIDDEN> Subject: bug#30928: Acknowledgement (no error val returned by 'nice' failure?) Message-ID: <handler.30928.B.152192094229890.ack <at> debbugs.gnu.org> References: <5AB6A8E6.2090606@HIDDEN> X-Gnu-PR-Message: ack 30928 X-Gnu-PR-Package: coreutils Reply-To: 30928 <at> debbugs.gnu.org Date: Sat, 24 Mar 2018 19:50:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-coreutils@HIDDEN If you wish to submit further information on this problem, please send it to 30928 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 30928: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D30928 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: bug#30928: no error val returned by 'nice' failure? Resent-From: Paul Eggert <eggert@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-coreutils@HIDDEN Resent-Date: Sat, 24 Mar 2018 21:10:02 +0000 Resent-Message-ID: <handler.30928.B30928.15219257715379 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 30928 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: L A Walsh <coreutils@HIDDEN>, 30928 <at> debbugs.gnu.org Received: via spool by 30928-submit <at> debbugs.gnu.org id=B30928.15219257715379 (code B ref 30928); Sat, 24 Mar 2018 21:10:02 +0000 Received: (at 30928) by debbugs.gnu.org; 24 Mar 2018 21:09:31 +0000 Received: from localhost ([127.0.0.1]:51911 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1ezqPr-0001Oh-KQ for submit <at> debbugs.gnu.org; Sat, 24 Mar 2018 17:09:31 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:45454) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eggert@HIDDEN>) id 1ezqPo-0001OR-5U for 30928 <at> debbugs.gnu.org; Sat, 24 Mar 2018 17:09:28 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id D380B1616AC; Sat, 24 Mar 2018 14:09:22 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id ELhR3qMdSgwY; Sat, 24 Mar 2018 14:09:22 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id E79EB1616B5; Sat, 24 Mar 2018 14:09:21 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id CAUFtSYyJEL3; Sat, 24 Mar 2018 14:09:21 -0700 (PDT) Received: from [192.168.1.9] (unknown [47.154.30.119]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id AF9C01616AC; Sat, 24 Mar 2018 14:09:21 -0700 (PDT) References: <5AB6A8E6.2090606@HIDDEN> From: Paul Eggert <eggert@HIDDEN> Organization: UCLA Computer Science Department Message-ID: <16d003ef-5b33-fbf7-942d-10b41885f224@HIDDEN> Date: Sat, 24 Mar 2018 14:09:21 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <5AB6A8E6.2090606@HIDDEN> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.3 (--) L A Walsh wrote: > how do you tell if the resetting of the > priority worked or failed? I guess you're supposed to look at stderr, which is what you did. This is the way 'nice' has behaved for quite some time, and it's what POSIX specifies. We'd need a real good reason to change it, given that changing it would no doubt break stuff.
X-Loop: help-debbugs@HIDDEN Subject: bug#30928: no error val returned by 'nice' failure? Resent-From: Bernhard Voelker <mail@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-coreutils@HIDDEN Resent-Date: Sat, 24 Mar 2018 23:08:02 +0000 Resent-Message-ID: <handler.30928.B30928.152193283423309 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 30928 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Paul Eggert <eggert@HIDDEN>, L A Walsh <coreutils@HIDDEN>, 30928 <at> debbugs.gnu.org Received: via spool by 30928-submit <at> debbugs.gnu.org id=B30928.152193283423309 (code B ref 30928); Sat, 24 Mar 2018 23:08:02 +0000 Received: (at 30928) by debbugs.gnu.org; 24 Mar 2018 23:07:14 +0000 Received: from localhost ([127.0.0.1]:51967 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1ezsFm-00063t-1w for submit <at> debbugs.gnu.org; Sat, 24 Mar 2018 19:07:14 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:52423) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <mail@HIDDEN>) id 1ezsFk-00063e-UH for 30928 <at> debbugs.gnu.org; Sat, 24 Mar 2018 19:07:13 -0400 Received: from [192.168.101.10] ([91.12.163.69]) by mrelayeu.kundenserver.de (mreue102 [212.227.15.183]) with ESMTPSA (Nemesis) id 0MLy2e-1ewYKa43g4-007ihU; Sun, 25 Mar 2018 00:06:49 +0100 References: <5AB6A8E6.2090606@HIDDEN> <16d003ef-5b33-fbf7-942d-10b41885f224@HIDDEN> From: Bernhard Voelker <mail@HIDDEN> Message-ID: <f2a02f84-920e-af4c-756a-03179079e6a5@HIDDEN> Date: Sun, 25 Mar 2018 00:06:47 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <16d003ef-5b33-fbf7-942d-10b41885f224@HIDDEN> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:6pxPEGQbrrK27YiOOSUoi5m3N0w8U3YqH7murZttqSAR1lQQbH/ gIY/lUrUq2es4ptOqJNFE7aQxysOalrGArXIhcQshaSwmvJbvG5J3QrKuCN54IflrlzHfSz lDstpnwGWrLl9YTga1d7HE1yM0QRhEFkoqYMpNUGJneKZKDzr5qqoTN2oZcya//k65DvhXU Wm+Yf2UoMDgweqPA+gkJw== X-UI-Out-Filterresults: notjunk:1;V01:K0:slLqNnn0Qc4=:6jDQSMKSAn6xNFY5/tvjgn /XsrOHUl2cds7IK8eNjC0XPbux/tqtM7j0HS5k2UOMwmLc/rLooLkpyLUjYOzIlaB/2wzszZj xZEV+Ul+FKdM2KuO/lvoyXeGvxI4sOWAuZxg873WMDGogGtzIpxh0+l3LCL00YyKAU/8QmfFu T/mOE6E3oGRyg62bViSbQ0Gqu2T3cdkaTq+PM2o2ViK3O50ih8XTMA/MmQ6VIPOdh6aGoMezK XRG2a1sGrNzeOwJiv7Pm3uTU9SyxXF4nSncg+2lMMRGEWo8ucnPr3nt0S0OpILzGlFshc54XG +WD140trAzHBiiszbNmhIrUd5E8t3reBFf7NYKU741GqpNrXoutKO0rCdMoRsoN0Hwxa7irRM K91lzOE78ae90V3Fz0kZul42T7jHReKWsBATFPgEgSLmV4177Kcxy2V3kegTfJFizOcwp23hM +tU7JwRr5XNcUwps3p6i5NShdJBIBP3Hlu4zPrhEeW0v4rx2XIH//ha1y0DDDiyatqJGYuZaD gawHhClTjwbqcqOogOxhVnh2yFGS7baRzTxk0zL97lRBccJQdaLuKQDVexZ4YKnxqkfmkaUon 0IHFsEUeEj1keUsoltTax5JLCQsvizYHLiodf4nVb6+rx0x4uitmI+kGrwOq+DeFjEEaSf4FK bBY5bxqerKNIpdcLEd9guDhB6XkT9vWxJU2vP8lAPNQSwvQ/kz0zhRGC5PGVMy5M4fmnPXjrE GpYEuviRTM7zqxhz9kSHrEq6qbm+Imy07/4v1bJ/H3PAeGooWUcfGeI6GEA= X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 0.0 (/) On 03/24/2018 10:09 PM, Paul Eggert wrote: > L A Walsh wrote: >> how do you tell if the resetting of the >> priority worked or failed? > > I guess you're supposed to look at stderr, which is what you did. > > This is the way 'nice' has behaved for quite some time, and it's what POSIX > specifies. We'd need a real good reason to change it, given that changing it > would no doubt break stuff. Anyway, it wouldn't harm to document this behavior in the Texinfo manual... the sentence from the POSIX spec sounds quote good: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/nice.html If the user lacks appropriate privileges to affect the nice value in the requested manner, the nice utility shall not affect the nice value; in this case, a warning message may be written to standard error, but this shall not prevent the invocation of /utility/ or affect the exit status. Have a nice day, Berny
X-Loop: help-debbugs@HIDDEN Subject: bug#30928: no error val returned by 'nice' failure? Resent-From: L A Walsh <coreutils@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-coreutils@HIDDEN Resent-Date: Sat, 24 Mar 2018 23:33:02 +0000 Resent-Message-ID: <handler.30928.B30928.152193436425628 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 30928 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Paul Eggert <eggert@HIDDEN> Cc: 30928 <at> debbugs.gnu.org Received: via spool by 30928-submit <at> debbugs.gnu.org id=B30928.152193436425628 (code B ref 30928); Sat, 24 Mar 2018 23:33:02 +0000 Received: (at 30928) by debbugs.gnu.org; 24 Mar 2018 23:32:44 +0000 Received: from localhost ([127.0.0.1]:51977 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1ezseS-0006fI-Ct for submit <at> debbugs.gnu.org; Sat, 24 Mar 2018 19:32:44 -0400 Received: from ishtar.tlinx.org ([173.164.175.65]:41406 helo=Ishtar.sc.tlinx.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <coreutils@HIDDEN>) id 1ezseQ-0006f9-2n for 30928 <at> debbugs.gnu.org; Sat, 24 Mar 2018 19:32:42 -0400 Received: from [192.168.3.12] (Athenae [192.168.3.12]) by Ishtar.sc.tlinx.org (8.14.7/8.14.4/SuSE Linux 0.8) with ESMTP id w2ONWTAF060783; Sat, 24 Mar 2018 16:32:31 -0700 Message-ID: <5AB6E00E.4010800@HIDDEN> Date: Sat, 24 Mar 2018 16:32:30 -0700 From: L A Walsh <coreutils@HIDDEN> User-Agent: Thunderbird MIME-Version: 1.0 References: <5AB6A8E6.2090606@HIDDEN> <16d003ef-5b33-fbf7-942d-10b41885f224@HIDDEN> In-Reply-To: <16d003ef-5b33-fbf7-942d-10b41885f224@HIDDEN> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.0 (/) Paul Eggert wrote: > L A Walsh wrote: >> how do you tell if the resetting of the >> priority worked or failed? > > I guess you're supposed to look at stderr, which is what you did. > > This is the way 'nice' has behaved for quite some time, and it's what POSIX > specifies. We'd need a real good reason to change it, given that changing it > would no doubt break stuff. --- How about a flag, like -e for 'fail on failure to change priority' and (maybe less important or useful) '-w' to only return nice's return value, with the posix error message returned for called app (if error). So, nice -e --19 sleep 99 would return immediately if not root with exit status for EPERM (and no text); sleep would not be executed. and for -w case: nice -w --19 ls noexist would return status for EPERM, and message: ls: cannot access 'noexist': No such file or directory Seems those would cover most possibly wants, though the first would be enough to determine if nice is going to work. Not an earth-shattering change, but at least it would allow some way to check if nice is going to work or not so one could not use it where it would fail (and not generate an error message). Thanks,..
X-Loop: help-debbugs@HIDDEN Subject: bug#30928: no error val returned by 'nice' failure? Resent-From: =?UTF-8?Q?P=C3=A1draig?= Brady <P@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-coreutils@HIDDEN Resent-Date: Sat, 31 Mar 2018 23:01:02 +0000 Resent-Message-ID: <handler.30928.B30928.152253724127421 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 30928 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: L A Walsh <coreutils@HIDDEN>, Paul Eggert <eggert@HIDDEN> Cc: 30928 <at> debbugs.gnu.org Received: via spool by 30928-submit <at> debbugs.gnu.org id=B30928.152253724127421 (code B ref 30928); Sat, 31 Mar 2018 23:01:02 +0000 Received: (at 30928) by debbugs.gnu.org; 31 Mar 2018 23:00:41 +0000 Received: from localhost ([127.0.0.1]:33377 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1f2PUH-00077s-2r for submit <at> debbugs.gnu.org; Sat, 31 Mar 2018 19:00:41 -0400 Received: from mail.magicbluesmoke.com ([82.195.144.49]:35274) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <P@HIDDEN>) id 1f2PUF-00075S-8h for 30928 <at> debbugs.gnu.org; Sat, 31 Mar 2018 19:00:39 -0400 Received: from localhost.localdomain (unknown [76.21.115.186]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.magicbluesmoke.com (Postfix) with ESMTPSA id 05E189E46; Sun, 1 Apr 2018 00:00:37 +0100 (IST) References: <5AB6A8E6.2090606@HIDDEN> <16d003ef-5b33-fbf7-942d-10b41885f224@HIDDEN> <5AB6E00E.4010800@HIDDEN> From: =?UTF-8?Q?P=C3=A1draig?= Brady <P@HIDDEN> Message-ID: <cc8682e3-6bb0-0213-ff59-2d4921f53508@HIDDEN> Date: Sat, 31 Mar 2018 16:00:36 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <5AB6E00E.4010800@HIDDEN> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 0.0 (/) On 24/03/18 16:32, L A Walsh wrote: > > > Paul Eggert wrote: >> L A Walsh wrote: >>> how do you tell if the resetting of the >>> priority worked or failed? >> >> I guess you're supposed to look at stderr, which is what you did. >> >> This is the way 'nice' has behaved for quite some time, and it's what POSIX >> specifies. We'd need a real good reason to change it, given that changing it >> would no doubt break stuff. > --- > How about a flag, like -e for 'fail on failure to change priority' and > (maybe less important or useful) '-w' to only return nice's return > value, with the posix error message returned for called app (if error). > > So, > nice -e --19 sleep 99 > would return immediately if not root with exit status for EPERM (and > no text); sleep would not be executed. > > and for -w case: > > nice -w --19 ls noexist > would return status for EPERM, and message: > ls: cannot access 'noexist': No such file or directory > > Seems those would cover most possibly wants, though > the first would be enough to determine if nice is going to work. > > Not an earth-shattering change, but at least it would allow > some way to check if nice is going to work or not so > one could not use it where it would fail (and not > generate an error message). I wonder could we special case `nice true` to indicate the nice return, so you could then: nice true && nice cmd || exit That would be forwards compat, and backwards compat in the sense it would degrade to the current situation. It's probably a bit hacky though. Pádraig
X-Loop: help-debbugs@HIDDEN Subject: bug#30928: no error val returned by 'nice' failure? Resent-From: Paul Eggert <eggert@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-coreutils@HIDDEN Resent-Date: Sun, 01 Apr 2018 17:04:01 +0000 Resent-Message-ID: <handler.30928.B30928.15226021915203 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 30928 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: =?UTF-8?Q?P=C3=A1draig?= Brady <P@HIDDEN>, L A Walsh <coreutils@HIDDEN> Cc: 30928 <at> debbugs.gnu.org Received: via spool by 30928-submit <at> debbugs.gnu.org id=B30928.15226021915203 (code B ref 30928); Sun, 01 Apr 2018 17:04:01 +0000 Received: (at 30928) by debbugs.gnu.org; 1 Apr 2018 17:03:11 +0000 Received: from localhost ([127.0.0.1]:34454 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1f2gNq-0001Lp-Uo for submit <at> debbugs.gnu.org; Sun, 01 Apr 2018 13:03:11 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:38256) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eggert@HIDDEN>) id 1f2gNo-0001Lc-Lu for 30928 <at> debbugs.gnu.org; Sun, 01 Apr 2018 13:03:09 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 3BE121616D2; Sun, 1 Apr 2018 10:03:02 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id SOpy5fi9yN_z; Sun, 1 Apr 2018 10:03:01 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 8D52A1616F5; Sun, 1 Apr 2018 10:03:01 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id o4X6KEybV471; Sun, 1 Apr 2018 10:03:01 -0700 (PDT) Received: from [192.168.1.9] (unknown [47.154.30.119]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 67E341616D2; Sun, 1 Apr 2018 10:03:01 -0700 (PDT) References: <5AB6A8E6.2090606@HIDDEN> <16d003ef-5b33-fbf7-942d-10b41885f224@HIDDEN> <5AB6E00E.4010800@HIDDEN> <cc8682e3-6bb0-0213-ff59-2d4921f53508@HIDDEN> From: Paul Eggert <eggert@HIDDEN> Organization: UCLA Computer Science Department Message-ID: <38265b4e-0647-ab26-b91e-ba212e454bab@HIDDEN> Date: Sun, 1 Apr 2018 10:03:01 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <cc8682e3-6bb0-0213-ff59-2d4921f53508@HIDDEN> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.3 (--) P=C3=A1draig Brady wrote: > I wonder could we special case `nice true` > to indicate the nice return That would lead to a problem where 'nice true' succeeds but 'nice cmd' (f= or=20 whatever reason) does not. Perhaps the OS has a limit as to how many proc= esses=20 you can 'nice', for example. It'd be safer to add an option to avoid such= race=20 conditions. Plus, as you mention it'd be less hacky, which means it'd be = more=20 straightforward to document.
Received: (at control) by debbugs.gnu.org; 30 Oct 2018 03:04:03 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 29 23:04:03 2018 Received: from localhost ([127.0.0.1]:52746 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1gHKK2-0002aJ-Oq for submit <at> debbugs.gnu.org; Mon, 29 Oct 2018 23:04:02 -0400 Received: from mail-pg1-f172.google.com ([209.85.215.172]:38167) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <assafgordon@HIDDEN>) id 1gHKK1-0002Zo-5N for control <at> debbugs.gnu.org; Mon, 29 Oct 2018 23:04:01 -0400 Received: by mail-pg1-f172.google.com with SMTP id f8-v6so4881141pgq.5 for <control <at> debbugs.gnu.org>; Mon, 29 Oct 2018 20:04:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:message-id:date:user-agent:mime-version:content-language :content-transfer-encoding; bh=MQdf6wWxDt1W1ADLOZD1waWhHhweU1NWRrk3JfiYic4=; b=ArD4ZqOpZMcmE77ZGf7tOMJpwiSbasPN8JPUXyWf6LFHE+WHEWK4aMhwMg/pvwGpfD 6O5/HpKl6T2Cjgy3Dxr9coLhHOm8VzAvIINn1OPt5ggXPXxFdbs9ng5+OBRKLsNX9iBx uXzPo6q8HS+fOcjy52rolEj1XqOTjFsKAaP1nisXMLnkeXSKocHT8/9b6v6trOQyo5lE Pt/PyJjVzA20RxaP6yHLywjSIXVThSvAYPcU/bCGBUR2EKH74o8ovoimLvagLvW8kWq/ Fg8d1xddiTa1i/DyxdfGDQEyL1J+84W4HCnw/uRaMGyU1iY4iSJuStBYWu0zCpfqMMPv SIxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=MQdf6wWxDt1W1ADLOZD1waWhHhweU1NWRrk3JfiYic4=; b=T1S+PfPK7WJwjSaRMD3doL7248fMFt/PG2exAmjqLEN+aWRBALoWAiaNu2VqWnH2Mz jVyvZsQhMi0d0ts0kyDOGrXXSKADOXiHzaZcEzmSVVG+a4UnqiDQ8/bwV0A5P9jjwJDf Is7rZ2PwGhh0GEmJSO8arNUYAQuZvXLRQ7B9jnWeDveiIj9SMtn7tHJOcg0GiNzzeSBC WH7+ig9gYBFtYrgxEeylDRRTlBnsBka7whWJBV+VuyucoUj1t1zMKoS6So6ekz9SCgXf GUj+1QPCF910AI1Lyn7sGvs+s0BcDI+812q9jQY22ItYfKBkt0+NZ5o/h7YoyaOw1o7O OKlQ== X-Gm-Message-State: AGRZ1gKNPnUCDF5btQy63NZ82VsH6+cqsg81GQTNDUHuLfUPOL9hZUtx JpWlfTWW1ZBZpNzVwn6jqFwHgJasrjA= X-Google-Smtp-Source: AJdET5f76SXsS6OC/Kg3OAXwg35A2h1YWqmGvmGgVMsoAItf+5SiQGOzexhtYe/lMGFLcf5SHdpWrg== X-Received: by 2002:a65:40c5:: with SMTP id u5mr13781284pgp.46.1540868634846; Mon, 29 Oct 2018 20:03:54 -0700 (PDT) Received: from tomato.housegordon.com (moose.housegordon.com. [184.68.105.38]) by smtp.googlemail.com with ESMTPSA id 64-v6sm47815744pfq.10.2018.10.29.20.03.53 for <control <at> debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Oct 2018 20:03:53 -0700 (PDT) To: control <at> debbugs.gnu.org From: Assaf Gordon <assafgordon@HIDDEN> Message-ID: <2a97e0bc-348d-f452-9773-85516d9861c1@HIDDEN> Date: Mon, 29 Oct 2018 21:03:48 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: severity 30928 wishlist retitle 30928 nice: add option to abort on failure to change priority [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (assafgordon[at]gmail.com) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.215.172 listed in list.dnswl.org] 1.8 MISSING_SUBJECT Missing Subject: header 0.2 NO_SUBJECT Extra score for no subject X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 1.0 (+) severity 30928 wishlist retitle 30928 nice: add option to abort on failure to change priority
Received: (at control) by debbugs.gnu.org; 30 Oct 2018 03:04:03 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 29 23:04:03 2018 Received: from localhost ([127.0.0.1]:52746 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1gHKK2-0002aJ-Oq for submit <at> debbugs.gnu.org; Mon, 29 Oct 2018 23:04:02 -0400 Received: from mail-pg1-f172.google.com ([209.85.215.172]:38167) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <assafgordon@HIDDEN>) id 1gHKK1-0002Zo-5N for control <at> debbugs.gnu.org; Mon, 29 Oct 2018 23:04:01 -0400 Received: by mail-pg1-f172.google.com with SMTP id f8-v6so4881141pgq.5 for <control <at> debbugs.gnu.org>; Mon, 29 Oct 2018 20:04:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:message-id:date:user-agent:mime-version:content-language :content-transfer-encoding; bh=MQdf6wWxDt1W1ADLOZD1waWhHhweU1NWRrk3JfiYic4=; b=ArD4ZqOpZMcmE77ZGf7tOMJpwiSbasPN8JPUXyWf6LFHE+WHEWK4aMhwMg/pvwGpfD 6O5/HpKl6T2Cjgy3Dxr9coLhHOm8VzAvIINn1OPt5ggXPXxFdbs9ng5+OBRKLsNX9iBx uXzPo6q8HS+fOcjy52rolEj1XqOTjFsKAaP1nisXMLnkeXSKocHT8/9b6v6trOQyo5lE Pt/PyJjVzA20RxaP6yHLywjSIXVThSvAYPcU/bCGBUR2EKH74o8ovoimLvagLvW8kWq/ Fg8d1xddiTa1i/DyxdfGDQEyL1J+84W4HCnw/uRaMGyU1iY4iSJuStBYWu0zCpfqMMPv SIxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=MQdf6wWxDt1W1ADLOZD1waWhHhweU1NWRrk3JfiYic4=; b=T1S+PfPK7WJwjSaRMD3doL7248fMFt/PG2exAmjqLEN+aWRBALoWAiaNu2VqWnH2Mz jVyvZsQhMi0d0ts0kyDOGrXXSKADOXiHzaZcEzmSVVG+a4UnqiDQ8/bwV0A5P9jjwJDf Is7rZ2PwGhh0GEmJSO8arNUYAQuZvXLRQ7B9jnWeDveiIj9SMtn7tHJOcg0GiNzzeSBC WH7+ig9gYBFtYrgxEeylDRRTlBnsBka7whWJBV+VuyucoUj1t1zMKoS6So6ekz9SCgXf GUj+1QPCF910AI1Lyn7sGvs+s0BcDI+812q9jQY22ItYfKBkt0+NZ5o/h7YoyaOw1o7O OKlQ== X-Gm-Message-State: AGRZ1gKNPnUCDF5btQy63NZ82VsH6+cqsg81GQTNDUHuLfUPOL9hZUtx JpWlfTWW1ZBZpNzVwn6jqFwHgJasrjA= X-Google-Smtp-Source: AJdET5f76SXsS6OC/Kg3OAXwg35A2h1YWqmGvmGgVMsoAItf+5SiQGOzexhtYe/lMGFLcf5SHdpWrg== X-Received: by 2002:a65:40c5:: with SMTP id u5mr13781284pgp.46.1540868634846; Mon, 29 Oct 2018 20:03:54 -0700 (PDT) Received: from tomato.housegordon.com (moose.housegordon.com. [184.68.105.38]) by smtp.googlemail.com with ESMTPSA id 64-v6sm47815744pfq.10.2018.10.29.20.03.53 for <control <at> debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Oct 2018 20:03:53 -0700 (PDT) To: control <at> debbugs.gnu.org From: Assaf Gordon <assafgordon@HIDDEN> Message-ID: <2a97e0bc-348d-f452-9773-85516d9861c1@HIDDEN> Date: Mon, 29 Oct 2018 21:03:48 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: severity 30928 wishlist retitle 30928 nice: add option to abort on failure to change priority [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (assafgordon[at]gmail.com) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.215.172 listed in list.dnswl.org] 1.8 MISSING_SUBJECT Missing Subject: header 0.2 NO_SUBJECT Extra score for no subject X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 1.0 (+) severity 30928 wishlist retitle 30928 nice: add option to abort on failure to change priority
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.