zsh-workers
 help / color / mirror / code / Atom feed
From: Kalle Olavi Niemitalo <kon@iki.fi>
To: zsh-workers@zsh.org
Subject: "ulimit -c junk" silently treated as "ulimit -c 0"
Date: Sun, 03 Jan 2010 00:45:44 +0200	[thread overview]
Message-ID: <87k4w0gm7b.fsf@Astalo.kon.iki.fi> (raw)

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.


             reply	other threads:[~2010-01-02 22:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-02 22:45 Kalle Olavi Niemitalo [this message]
2010-01-05 15:52 ` Peter Stephenson
2010-01-05 16:24 ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k4w0gm7b.fsf@Astalo.kon.iki.fi \
    --to=kon@iki.fi \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).