bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#2602: Emacs shell exits when executed command sets stdout and stderr


From: Andrew Hyatt
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
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (darwin)

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 via email to

[Prev in Thread] Current Thread [Next in Thread]