tmuxp icon indicating copy to clipboard operation
tmuxp copied to clipboard

`before_script` cannot start headless kakoune

Open ttttcrngyblflpp opened this issue 4 years ago • 4 comments

Attempting to start a headless Kakoune session in a before_script causes tmuxp loading to hang forever. The Kakoune session is started correctly (so the script "completed" successfully), and an empty tmux session is started, so it looks like tmuxp is somehow waiting for before_script to complete even though it already has. This probably has something directly to do with the exact mechanism that Kakoune uses to "daemonize" itself, but nevertheless since running the command in a shell completes successfully, it should work as a before_script.

Steps to reproduce:

  1. Have before_script: kak -s -d mykaksession in a config.
  2. Run tmuxp load mytmuxp.yml

Observed Results:

  • One Loading log line is printed, and then nothing happens ever.

Expected Results:

  • The tmuxp session to load correctly.

ttttcrngyblflpp avatar Jul 10 '21 02:07 ttttcrngyblflpp

I can see the same issue when you try to start an openconnect VPN connection with the --background flag.

If I put this in a script and run as a normal command on my shell it works, i enter my credentials and the process forks into the background.

When I run the same script as before_script in tmuxp it establishes the VPN connection and openconnect says it forks into the background but then nothing happens. I can see with another terminal that the tmux session is started but the panels are not created.

This is currently the main issue why I can't migrate my work to tmuxp.

Segaja avatar Feb 27 '22 21:02 Segaja

@tony if you need any help testing or debugging this please let us know. I'm happy to test stuff out, if you tell me what to do.

Segaja avatar Feb 27 '22 23:02 Segaja

@Segaja Is this a command you're putting & after?

@tony if you need any help testing or debugging this please let us know. I'm happy to test stuff out, if you tell me what to do.

Can you think of a basic linux command that'd recreate the hang (without needing to installing a package)? That'd make it easier to simulate in our tests

tony avatar Feb 27 '22 23:02 tony

Hm, I would have to think about that. I guess the problem lies in how these programs fork into the background after their initial execution.

Segaja avatar Feb 28 '22 08:02 Segaja