Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
"ulimit -c junk" silently treated as "ulimit -c 0"
- X-seq: zsh-workers 27552
- From: Kalle Olavi Niemitalo <kon@xxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: "ulimit -c junk" silently treated as "ulimit -c 0"
- Date: Sun, 03 Jan 2010 00:45:44 +0200
- Keywords: shell builtin,syntax error,number,atoi
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author