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

i3-msg doesn't execute commands after restart #3570

Open
jk977 opened this Issue Dec 23, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@jk977
Copy link

jk977 commented Dec 23, 2018

I'm submitting a…

[x] Bug
[ ] Feature Request
[ ] Documentation Request
[ ] Other (Please describe in detail)

Current Behavior

When sending a command to i3 through i3-msg, all commands after a restart command are ignored.

Expected Behavior

All of the passed commands should be executed.

Reproduction Instructions

Send a command to i3 with the format "...; restart; ...". Everything before the restart will run, and everything after won't. For example:

i3-msg "workspace 1; restart; workspace 2"

This ends with workspace 1 showing, not workspace 2.

Environment

Output of i3 --moreversion 2>&-:

Binary i3 version:  4.16-73-g3e3257a (2018-12-16, branch "next") © 2009 Michael Stapelberg and contributors
Running i3 version: 4.16-73-g3e3257a (2018-12-16, branch "next") (pid 1486)
Loaded i3 config: /home/user/.config/i3/config (Last modified: Sun 23 Dec 2018 02:13:17 PM PST, 27 seconds ago)

The i3 binary you just called: /usr/bin/i3
The i3 binary you are running: i3-with-/i3

Contents of /home/user/.config/i3/config:

set $mod Mod1
set $super Mod4

floating_modifier $mod

bindsym $mod+Return exec $term
bindsym $mod+Shift+c reload

bindsym $mod+Shift+r restart
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
- Linux Distribution & Version: Ubuntu GNOME 16.04 (kernel 4.15.0-42-generic)
- Are you using a compositor (e.g., xcompmgr or compton): No

Other information:

I'm fairly certain this happens because i3_restart() (in util.c) calls execvp(), so the parser never reaches subsequent commands. With the payload "workspace 1; restart; workspace 2", the process is replaced with a new i3 process before the second workspace command is reached. This is probably a more generalized case of issue #3565 -- a fix for this could also fix that issue, but this issue could still be present if only #3565 is fixed.

@i3bot

This comment has been minimized.

Copy link

i3bot commented Dec 23, 2018

I don’t see a link to logs.i3wm.org. Did you follow https://i3wm.org/docs/debugging.html? (In case you actually provided a link to a logfile, please ignore me.)

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