Skip to content

eval in config.fish inside a second instance stops the shell #5210

Closed

Description

@zanchey

Running 2.7.1-1449-gdeb6d477

If you have the following in your config.fish:

if status is-interactive
   eval (touch /dev/null)
end

Then when starting a new instance of fish inside an existing instance, the behaviour is as follows:

> echo $SHLVL
1
> fish
Job 1, 'fish' has stopped
> echo $SHLVL
1
> jobs
Job	Group	State	Command
1	26930	stopped	fish
> fg
Send job 1, 'fish' to foreground
zanchey@oxygen ~> echo $SHLVL
2
zanchey@oxygen ~> exit
> echo $SHLVL
1

This bites me because I have eval (python3 -m virtualfish) in my config.fish.

Activity

  1. added
    bug
    on Sep 25, 2018
  2. added this to the fish-3.0 milestone on Sep 25, 2018
  3. faho commented on Sep 25, 2018

    @faho
    Member

    This bites me because I have eval (python3 -m virtualfish) in my config.fish.

    That should just be python3 -m virtualfish | source. Does that work?

    If it does the problem here is evals weird job control stuff.

  4. faho commented on Sep 25, 2018

    @faho
    Member

    Yup:

    status job-control full
    echo echo wurst | source # stops
    status job-control interactive
    echo echo wurst | source # does not

    This is probably caused by fa66ac8 and friends.

  5. faho commented on Sep 25, 2018

    @faho
    Member

    Definitely fa66ac8. This works:

    status job-control full
    command echo echo wurst | source

    while builtin echo command echo | source still STOPs.

    I think this is an issue with our keepalive process.

  6. mqudsi commented on Sep 26, 2018

    @mqudsi
    Contributor

    I toyed with using owl to create a parser for fish expressions that would enable creating a logical process dependency chain to enable both simultaneous evaluation of non-dependent subshells, parallel commands, functions, or builtins and allow us to get rid of the keepalive process by instead creating a wait chain where each function only waits on the process(es) needed for its input streams to become ready but ran into two issues that prevented me from progressing down that track.

  7. ridiculousfish commented on Sep 29, 2018

    @ridiculousfish
    Member

    I finally figured out how to do concurrency properly here - with a Python-style GIL (fishgil, haha). So I believe the concurrency issues will be mostly solved in 3.1.

    I'll take a look at this fa66ac8-caused regression.

  8. added 18 commits that reference this issue on Oct 2, 2018
    aa121f1
    477703d
    9e8a78c
    1956596
    aefdccc
    9bdd231
    bd5010a
    514eea9
    4c6b890
    df6e0ae
    5ca50bd
    0e00af6
    5dcec40
    3015b45
    e05f1be
    67165bb
    6184c15
    475be24
  9. added a commit that references this issue on Oct 27, 2018
    af0c8d5
  10. added a commit that references this issue on Nov 24, 2018
    3674eeb
  11. locked as resolved and limited conversation to collaborators on Apr 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions