Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

"ulimit -c junk" silently treated as "ulimit -c 0"



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