zsh-workers
 help / color / mirror / code / Atom feed
* "ulimit -c junk" silently treated as "ulimit -c 0"
@ 2010-01-02 22:45 Kalle Olavi Niemitalo
  2010-01-05 15:52 ` Peter Stephenson
  2010-01-05 16:24 ` Peter Stephenson
  0 siblings, 2 replies; 3+ messages in thread
From: Kalle Olavi Niemitalo @ 2010-01-02 22:45 UTC (permalink / raw)
  To: zsh-workers

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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-01-05 16:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-02 22:45 "ulimit -c junk" silently treated as "ulimit -c 0" Kalle Olavi Niemitalo
2010-01-05 15:52 ` Peter Stephenson
2010-01-05 16:24 ` Peter Stephenson

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).