zsh-workers
 help / color / mirror / code / Atom feed
From: Ismail Donmez <ismail@i10z.com>
To: zsh-workers@zsh.org
Subject: Re: Can't redirect segmentation fault error to file
Date: Mon, 26 Oct 2015 07:21:42 +0000 (UTC)	[thread overview]
Message-ID: <loom.20151026T082015-462@post.gmane.org> (raw)
In-Reply-To: <151023120632.ZM7970@torch.brasslantern.com>

Bart Schaefer <schaefer <at> brasslantern.com> writes:

> 
> On Oct 23,  7:06am, Ismail Donmez wrote:
> }
> } Suppose I have a crashing executable:
> } 
> } For some reason I want to redirect the segmentation fault error to a 
file.
> 
> The segmentation fault error isn't printed by the failing command, it's
> printed by the shell when it is notified of the failed exit status of
> the command.
> 
> Zsh sends job control messages to the "shell output" (typically the
> terminal) rather than to standard error, so redirecting standard error
> won't trap anything.
> 
> That said, I'm not entirely sure why it doesn't print anything at all:

This seems to be contradicting to what bash does:

> { ./a.out; } 2> foo
> cat foo
Segmentation fault (core dumped)
> bash --version
GNU bash, version 4.3.42(1)-release (x86_64-suse-linux-gnu

And indeed zsh always seems to print [1] as if the program goes to 
background.

Well for now I can live with it.



      reply	other threads:[~2015-10-26  7:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-23  7:06 Ismail Donmez
2015-10-23 19:06 ` Bart Schaefer
2015-10-26  7:21   ` Ismail Donmez [this message]

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=loom.20151026T082015-462@post.gmane.org \
    --to=ismail@i10z.com \
    --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).