GNU bug report logs - #2602
Emacs shell exits when executed command sets stdout and stderr to be non-blocking

Previous Next

Package: emacs;

Reported by: "William K. Foster" <wkf <at> alum.mit.edu>

Date: Mon, 9 Mar 2009 02:10:04 UTC

Severity: normal

Tags: unreproducible

Merged with 2653

Done: Andrew Hyatt <ahyatt <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 2602 in the body.
You can then email your comments to 2602 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2602; Package emacs. (Mon, 09 Mar 2009 02:10:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to "William K. Foster" <wkf <at> alum.mit.edu>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Mon, 09 Mar 2009 02:10:05 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "William K. Foster" <wkf <at> alum.mit.edu>
To: bug-gnu-emacs <at> gnu.org
Subject: Emacs shell exits when executed command sets stdout and stderr to be 
	non-blocking
Date: Sun, 8 Mar 2009 13:56:48 -0700
[Message part 1 (text/plain, inline)]
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
[Message part 2 (text/html, inline)]

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2602; Package emacs. (Mon, 09 Mar 2009 03:10:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to "William K. Foster" <wkf <at> alum.mit.edu>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Mon, 09 Mar 2009 03:10:04 GMT) Full text and rfc822 format available.

Message #10 received at 2602 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "William K. Foster" <wkf <at> alum.mit.edu>
To: 2602 <at> debbugs.gnu.org
Subject: This occurs with at least Emacs v22.3.1 (eom)
Date: Sun, 8 Mar 2009 20:03:49 -0700
[Message part 1 (text/plain, inline)]

[Message part 2 (text/html, inline)]

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2602; Package emacs. (Mon, 09 Mar 2009 22:15:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to "William K. Foster" <wkf <at> alum.mit.edu>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Mon, 09 Mar 2009 22:15:04 GMT) Full text and rfc822 format available.

Message #15 received at 2602 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "William K. Foster" <wkf <at> alum.mit.edu>
To: 2602 <at> debbugs.gnu.org
Subject: This occurs with at least Emacs v22.3.1
Date: Mon, 9 Mar 2009 15:09:51 -0700
[Message part 1 (text/plain, inline)]
This bug occurs with at least Emacs v22.3.1.
[Message part 2 (text/html, inline)]

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2602; Package emacs. (Tue, 10 Mar 2009 01:30:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to "William K. Foster" <wkf <at> alum.mit.edu>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Tue, 10 Mar 2009 01:30:03 GMT) Full text and rfc822 format available.

Message #20 received at 2602 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "William K. Foster" <wkf <at> alum.mit.edu>
To: 2602 <at> debbugs.gnu.org
Subject: This occurs with at least Emacs v22.3.1
Date: Mon, 9 Mar 2009 18:25:23 -0700
[Message part 1 (text/plain, inline)]
The original description of this bug omitted the fact that this issue occurs
with at least Emacs v22.3.1.

-William
[Message part 2 (text/html, inline)]

Merged 2602 2653. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Fri, 13 Mar 2009 02:40:04 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#2602; Package emacs. (Sun, 24 Jan 2016 22:04:02 GMT) Full text and rfc822 format available.

Message #25 received at 2602 <at> debbugs.gnu.org (full text, mbox):

From: Andrew Hyatt <ahyatt <at> gmail.com>
To: "William K. Foster" <wkf <at> alum.mit.edu>
Cc: 2602 <at> debbugs.gnu.org
Subject: Re: 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
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 <at> 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




Added tag(s) unreproducible. Request was from Andrew Hyatt <ahyatt <at> gmail.com> to control <at> debbugs.gnu.org. (Sun, 24 Jan 2016 22:05:01 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 2602 <at> debbugs.gnu.org and "William K. Foster" <wkf <at> alum.mit.edu> Request was from Andrew Hyatt <ahyatt <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 25 Jan 2016 04:24:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 22 Feb 2016 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 122 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.