all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andrew Hyatt <ahyatt@gmail.com>
To: "William K. Foster" <wkf@alum.mit.edu>
Cc: 2602@debbugs.gnu.org
Subject: bug#2602: Emacs shell exits when executed command sets stdout and stderr to be non-blocking
Date: Sun, 24 Jan 2016 17:03:50 -0500	[thread overview]
Message-ID: <m2r3h64ou1.fsf@gmail.com> (raw)
In-Reply-To: <aca4364f0903081356m4eacd6f8k3500f133a8df4144@mail.gmail.com> (William K. Foster's message of "Sun, 8 Mar 2009 13:56:48 -0700")


I cannot reproduce this on Emacs 25.  Can you let me know if you are
still able to see this bug, otherwise I'll close this issue.

"William K. Foster" <wkf@alum.mit.edu> writes:

> Hello,
>
> Create an application that does the following:
>
> void setFdBlocking(int fd, bool block) {
> // Set an fd's blocking flag on or off.
> int flags;
>
> if (0 > (flags = fcntl(fd, F_GETFL, 0))) {
> throw;
> }
>
> if (block) {
> flags &= ~O_NONBLOCK;
> } else {
> flags |= O_NONBLOCK;
> }
>
> if (0 > fcntl(fd, F_SETFL, flags)) {
> throw;
> }
> }
>
> // Make Stdout and Stderr be non-blocking.
> setFdBlocking(1, false);
> setFdBlocking(2, false);
>
> If you execute the application from a shell inside emacs, the shell will exit when the command returns.
>
> This does not happen for a shell outside of emacs.
>
> Thanks.
>
> -William





      reply	other threads:[~2016-01-24 22:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-08 20:56 bug#2602: Emacs shell exits when executed command sets stdout and stderr to be non-blocking William K. Foster
2016-01-24 22:03 ` Andrew Hyatt [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=m2r3h64ou1.fsf@gmail.com \
    --to=ahyatt@gmail.com \
    --cc=2602@debbugs.gnu.org \
    --cc=wkf@alum.mit.edu \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.