New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exiting fish causes calling aplication to suspend #197

Closed
maxfl opened this Issue Jul 1, 2012 · 9 comments

Comments

Projects
None yet
4 participants
@maxfl
Contributor

maxfl commented Jul 1, 2012

This is an old and strange bug, which is not that harmful, but rather annoying.

One can use the following python code to illustrate it:

from os import system
system('fish')

In fish type exit and see the message:
Job 1, “ipython” has stopped
Then you need to call 'fg' to put the program back to foreground.

The same happens if I use subprocess module of if I use another languages (lua: 'os.execute "fish"').

@ridiculousfish

This comment has been minimized.

Show comment
Hide comment
@ridiculousfish

ridiculousfish Jul 14, 2012

Member

I'm not able to reproduce this

Member

ridiculousfish commented Jul 14, 2012

I'm not able to reproduce this

@maxfl

This comment has been minimized.

Show comment
Hide comment
@maxfl

maxfl Jul 15, 2012

Contributor

I've tested the latest version. The problem still exists.
Do you run on Mac? Can you try other systems/terminal emulators?

Contributor

maxfl commented Jul 15, 2012

I've tested the latest version. The problem still exists.
Do you run on Mac? Can you try other systems/terminal emulators?

@siteshwar

This comment has been minimized.

Show comment
Hide comment
@siteshwar

siteshwar Jul 15, 2012

Member

I am running Linux and able to reproduce this bug.

Member

siteshwar commented Jul 15, 2012

I am running Linux and able to reproduce this bug.

@smlx

This comment has been minimized.

Show comment
Hide comment
@smlx

smlx Aug 12, 2012

Contributor

I am not able to reproduce this on debian wheezy. Possible regression?

Edit: scratch that. I see it now.

Contributor

smlx commented Aug 12, 2012

I am not able to reproduce this on debian wheezy. Possible regression?

Edit: scratch that. I see it now.

@ridiculousfish

This comment has been minimized.

Show comment
Hide comment
@ridiculousfish

ridiculousfish Nov 18, 2012

Member

Oh, I see, you have to run the Python code from the repl. A script file won't reproduce it.

Member

ridiculousfish commented Nov 18, 2012

Oh, I see, you have to run the Python code from the repl. A script file won't reproduce it.

@ridiculousfish

This comment has been minimized.

Show comment
Hide comment
@ridiculousfish

ridiculousfish Nov 18, 2012

Member

This code is triggering it:

/* Grab control of the terminal.  */
if( tcsetpgrp (STDIN_FILENO, shell_pgid) )
Member

ridiculousfish commented Nov 18, 2012

This code is triggering it:

/* Grab control of the terminal.  */
if( tcsetpgrp (STDIN_FILENO, shell_pgid) )
@ridiculousfish

This comment has been minimized.

Show comment
Hide comment
@ridiculousfish

ridiculousfish Nov 18, 2012

Member

Minimal program that reproduces this:

#include <sys/types.h>
#include <unistd.h>
#include <stdio.h>
#include <signal.h>

int main(void) {
    setpgid(0, getpid());
    signal(SIGTTOU, SIG_IGN);
    tcsetpgrp (STDIN_FILENO, getpid());
    return 0;
}
Member

ridiculousfish commented Nov 18, 2012

Minimal program that reproduces this:

#include <sys/types.h>
#include <unistd.h>
#include <stdio.h>
#include <signal.h>

int main(void) {
    setpgid(0, getpid());
    signal(SIGTTOU, SIG_IGN);
    tcsetpgrp (STDIN_FILENO, getpid());
    return 0;
}
@ridiculousfish

This comment has been minimized.

Show comment
Hide comment
@ridiculousfish

ridiculousfish Nov 18, 2012

Member

I can reproduce these symptoms with other shells by sending them SIGKILL instead of allowing them to exit gracefully. I conclude they must be saving and restoring the process controlling terminal manually.

Member

ridiculousfish commented Nov 18, 2012

I can reproduce these symptoms with other shells by sending them SIGKILL instead of allowing them to exit gracefully. I conclude they must be saving and restoring the process controlling terminal manually.

@ridiculousfish

This comment has been minimized.

Show comment
Hide comment
@ridiculousfish

ridiculousfish Nov 18, 2012

Member

I added the same and it seems to fix the problem.

To git@github.com:fish-shell/fish-shell.git
b79854a..c9c2fc5 master -> master

Member

ridiculousfish commented Nov 18, 2012

I added the same and it seems to fix the problem.

To git@github.com:fish-shell/fish-shell.git
b79854a..c9c2fc5 master -> master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment