From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15709 invoked by alias); 2 Jan 2010 22:55:08 -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: X-Seq: 27552 Received: (qmail 17707 invoked from network); 2 Jan 2010 22:55:06 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_00,FH_DATE_PAST_20XX autolearn=no version=3.2.5 Received-SPF: none (ns1.primenet.com.au: domain at iki.fi does not designate permitted sender hosts) X-Virus-Scanned: DNA Postiturva at dnainternet.net From: Kalle Olavi Niemitalo To: zsh-workers@zsh.org Subject: "ulimit -c junk" silently treated as "ulimit -c 0" Keywords: shell builtin,syntax error,number,atoi X-Accept-Language: fi;q=1.0, en;q=0.9, sv;q=0.5, de;q=0.1 Date: Sun, 03 Jan 2010 00:45:44 +0200 Message-ID: <87k4w0gm7b.fsf@Astalo.kon.iki.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii When I switched from bash to zsh, I copied this to my .zprofile: ulimit -c hard In bash, it sets the soft limit of core dump size to be the same as the hard limit. In zsh 4.3.10 though, I now see it just makes the soft limit zero and returns success: Kalle@Pulska:~ 1% ulimit -H -c 54321; ulimit -S -c 12345 Kalle@Pulska:~ 1% ulimit -H -c 54321 Kalle@Pulska:~ 1% ulimit -S -c 12345 Kalle@Pulska:~ 1% ulimit -c hard Kalle@Pulska:~ 1% echo $? 0 Kalle@Pulska:~ 1% ulimit -H -c 54321 Kalle@Pulska:~ 1% ulimit -S -c 0 Kalle@Pulska:~ 1% The same appears to happen with any unsupported word such as "junk"; it is not specific to "hard". In bash 4.0.33, I instead get an error message: Kalle@Pulska:~$ ulimit -c junk bash: ulimit: junk: invalid number Kalle@Pulska:~$ echo $? 1 Kalle@Pulska:~$ I think zsh should do the same as bash here, i.e. output an error message and return failure.