Re: Incorrect passing of argc argv with multiple redirects

2019-07-30 Thread Chet Ramey
On 7/30/19 1:08 PM, Morgan McClure wrote: > ./a.out foo > /dev/null 2&>1; echo $? > returns 3 NOT as expected You probably meant to use 2>&1. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc

Re: Incorrect passing of argc argv with multiple redirects

2019-07-30 Thread Eduardo Bustamante
On Tue, Jul 30, 2019 at 10:35 AM Morgan McClure wrote: (...) > ./a.out foo > /dev/null 2&>1; echo $? > returns 3 NOT as expected Are you 100% certain the `2&>1` redirection means what you think it means? (hint: I recommend reading the "Redirecting Standard Output and Standard Error" section o

Incorrect passing of argc argv with multiple redirects

2019-07-30 Thread Morgan McClure
So I think I've discovered a bug with the way that bash handles passing argc and argv to programs in the presence of multiple redirects. For this testing, my C source file is just the following: int main(int argc, char * argv[]) { return argc; } For the purposes of testing, I comment out one

Re: ulimit call lists invalid options

2019-07-30 Thread Robert Elz
Date:Tue, 30 Jul 2019 00:46:38 -0700 From:L A Walsh Message-ID: <5d3ff5de.50...@tlinx.org> | It isn't a judgment call to list only the options it supports on a given | system. I'd think that would be clear. That's an opinion, and that makes it something which ev

Re: valid kernel patch? using -e to catch errors?

2019-07-30 Thread L A Walsh
On 2019/07/29 22:49, k...@munnari.oz.au wrote: > | I didn't see this come back from the list and it was sent > | 45 minutes ago (vs. other emails of mine that have come > | back in under a minute). > | Did anyone else see it? > > Yes. The original appeared (before this repeat). Avoid

Re: ulimit call lists invalid options

2019-07-30 Thread L A Walsh
On 2019/07/29 22:09, Robert Elz wrote: > Whether bash ought limit its usage output option list to those > options supported on the system it is running on, or whether it > is better to list everything it knows about (either my, or your, > system might have more limits bash knows nothing about)

Re: ulimit call lists invalid options

2019-07-30 Thread Robert Elz
ps: if you want to find out which ulimit options are supported on your system, use (parse) the output of ulimit -a Modified script that does that appended .. still bash specific, as the output format of ulimit -a is also not specified ... in fact, giving any options to ulimit at all, aside from -f