aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/exec_always.c
Commit message (Collapse)AuthorAge
* Define _POSIX_C_SOURCE globallyLibravatar Simon Ser2024-02-23
| | | | See discussion in https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4555
* launcher: make launcher context seat awareLibravatar Ronan Pigott2023-02-05
|
* Add missing includes & remove duplicatesLibravatar Carl Smedstad2023-01-03
|
* launcher: export X startup ids and use them for workspace matchingLibravatar Ronan Pigott2022-11-26
|
* launcher: export xdga tokens and use them for workspace matchingLibravatar Ronan Pigott2022-11-26
|
* launcher: fudge the interface a bitLibravatar Ronan Pigott2022-11-26
| | | | We want to create a context before knowing the pid it will match with.
* launcher: initialize launcher_ctxs once on startupLibravatar Ronan Pigott2022-11-26
|
* launcher: rename pid_workspace to launcher_ctxLibravatar Ronan Pigott2022-11-26
| | | | Soon we will match views with more than just a pid.
* root: move the workspace matching code to its own fileLibravatar Ronan Pigott2022-11-26
| | | | | | | This removes the pid_workspace bits from tree/root before it gets too interesting. No functional change.
* Bump RLIMIT_NOFILELibravatar Simon Ser2021-10-30
| | | | | | | | Wayland compositors handle many file descriptors: client connections, DMA-BUFs, sync_files, wl_data_device pipes, and so on. Bump the limit to the max. Closes: https://github.com/swaywm/sway/issues/6285
* sway: commands: exec: restore SIGPIPE before exec:ingLibravatar Daniel Eklöf2021-06-05
| | | | | | | | | | | | Sway ignores SIGPIPE (by installing a SIG_IGN handler), in order to “prevent IPC from crashing Sway”. SIG_IGN handlers are the *only* signal handlers inherited in sub-processes. As such, we should be a good citizen and restore the SIGPIPE handler to its default handler. Original bug report: https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg1806907.html
* commands/exec: stop truncating >4095-byte commandsLibravatar Manuel Stoeckl2021-05-10
|
* commands/exec_always: log error on execlp failureLibravatar Simon Ser2021-04-22
| | | | And exit(1) instead of indicating success.
* Use execlp("sh") instead of execl("/bin/sh")Libravatar Simon Ser2021-04-22
| | | | This stops assuming the POSIX shell command is located in /bin.
* exec: fix validation during config reloadLibravatar Konstantin Pospelov2020-08-24
| | | | | Split cmd_exec_always into separate methods for general validation and process creation. This fixes a potential call of join_args with 0 arguments.
* Replace wlr_log with sway_logLibravatar M Stoeckl2019-01-21
| | | | | | | | | | | | | This commit mostly duplicates the wlr_log functions, although with a sway_* prefix. (This is very similar to PR #2009.) However, the logging function no longer needs to be replaceable, so sway_log_init's second argument is used to set the exit callback for sway_abort. wlr_log_init is still invoked in sway/main.c This commit makes it easier to remove the wlroots dependency for the helper programs swaymsg, swaybg, swaybar, and swaynag.
* Remove now-unused "input" argument of cmd_results_newLibravatar M Stoeckl2019-01-14
| | | | | | | | | Patch tested by compiling with `__attribute__ ((format (printf, 2, 3)))` applied to `cmd_results_new`. String usage constants have been converted from pointers to arrays when encountered. General handler format strings were sometimes modified to include the old input string, especially for unknown command errors.
* Replace _XOPEN_SOURCE with _POSIX_C_SOURCELibravatar emersion2018-11-25
| | | | And make sure we don't define both in the same source file.
* commands/exec_always: defer command on config validationLibravatar Rouven Czerwinski2018-11-05
| | | | | | | | The exec_always command was executed twice, since it was not checking for the config->validating variable. Fix this by defering the command if the configuration is validating. Fixes #3072
* commands: remove EXPECTED_MORE_THANLibravatar Ian Fan2018-10-23
| | | | Its uses have been replaced with EXPECTED_AT_LEAST.
* commands: print correct command on error for exec and opacityLibravatar Ian Fan2018-10-23
|
* commands: fix exec quotingLibravatar Ian Fan2018-08-29
|
* Remove layout.cLibravatar Ryan Dwyer2018-08-26
| | | | | | | | | | | | | | | | | | | | | | | | | When we have type safety we'll need to have functions for workspace_add_tiling and so on. This means the existing container functions will be just for containers, so they are being moved to container.c. At this point layout.c doesn't contain much else, so I've relocated everything and removed the file. * container_swap and its static functions have been moved to the swap command and made static. * container_recursive_resize has been moved to the resize command and made static. * The following have been moved to container.c: * container_handle_fullscreen_reparent * container_insert_child * container_add_sibling * container_add_child * container_remove_child * container_replace_child * container_split * enum movement_direction and sway_dir_to_wlr have been moved to util.c. Side note: Several commands included layout.h which then included root.h. With layout.h gone, root.h has to be included by those commands.
* commands: handle quoted exec commandLibravatar Ian Fan2018-08-18
|
* Move workspace pid code to root.cLibravatar Ryan Dwyer2018-08-04
|
* Reset signal mask after forkLibravatar Marien Zwart2018-08-02
| | | | | | | | | | | wlroots uses wl_event_loop_add_signal to handle SIGUSR1 from Xwayland. wl_event_loop_add_signal works by masking the signal and receiving it from a signalfd. The signal mask is preserved across fork and exec, so subprocesses spawned by Sway start with SIGUSR1 masked. Most subprocesses do not expect this and never unmask the signal, resulting in missing functionality or unexpected behavior for processes that use SIGUSR1 (such as i3status). Fix this by unmasking all signals between fork and exec.
* Merge branch 'master' into pid-workspacesLibravatar Drew DeVault2018-07-23
|\
| * Update for swaywm/wlroots#1126Libravatar emersion2018-07-09
| |
| * exec_always: fix leaksLibravatar Dominique Martinet2018-07-02
| | | | | | | | | | | | | | | | | | | | | | | | - child would leak in the workspace_record_pid path - removing malloc lets us get rid of That Comment nobody seems to remember what it was about - we would leak pipe fds on first fork failling - we didn't return an error if second fork failed - the final executed process still had both pipe fds (would show up in /proc/23560/fd in launched programs) - we would write twice to the pipe if execl failed for some reason (e.g. if /bin/sh doesn't exist?!)
* | Implement pid->workspace trackingLibravatar Drew DeVault2018-07-01
|/ | | | | | | | | When you spawn a process with the exec command, sway now notes the workspace you had focused and the pid of the child process, then assigns that workspace to the child when its window appears. Some of this is carried over from sway 0.15, but with some major refactoring and centralization of state.
* sway exec command: use waitpid instead of waitLibravatar Dominique Martinet2018-06-08
|
* Revert "exec_always: Search for executables in /usr/lib/sway"Libravatar Rostislav Pehlivanov2018-05-06
| | | | This reverts commit 7709340727fe2834f87b43aeeaef878694d5acd6.
* Revert "Make the LIBDIR path configurable"Libravatar Rostislav Pehlivanov2018-05-06
| | | | This reverts commit 1670b46bf6e56d37e69ab0fa32c6799e83397020.
* Revert "Meson: Replace option `instlibdir` with `libexecdir`"Libravatar Rostislav Pehlivanov2018-05-06
| | | | This reverts commit 830c4ef74c00dbe448da46cdbc576178abc5728e.
* Revert "command/exec_always: Use wlr_log for logging errors in the child ↵Libravatar Rostislav Pehlivanov2018-05-06
| | | | | | process" This reverts commit 177c67e6b89404d9d477b82c00c1353cd4696096.
* Fix PATH setenv() in exec_alwaysLibravatar Ryan Dwyer2018-05-06
|
* command/exec_always: Use wlr_log for logging errors in the child processLibravatar Nicolas Braud-Santoni2018-05-05
|
* Meson: Replace option `instlibdir` with `libexecdir`Libravatar Nicolas Braud-Santoni2018-05-05
| | | | | Derive a value from it, called `rundir` rather than writing join_paths(libexecdir, 'sway') all over the place.
* Make the LIBDIR path configurableLibravatar Nicolas Braud-Santoni2018-05-05
|
* exec_always: Search for executables in /usr/lib/swayLibravatar Nicolas Braud-Santoni2018-05-05
|
* Fix gcc string truncation warningsLibravatar Dominique Martinet2018-04-13
|
* Revert "Merge pull request #1653 from swaywm/revert-1647-refactor-tree"Libravatar Tony Crisci2018-03-29
| | | | | This reverts commit 472e81f35d689d67cda241acafda91c688d61046, reversing changes made to 6b7841b11ff4cd35f54d69dc92029855893e5ce0.
* Revert "Refactor tree"Libravatar Drew DeVault2018-03-29
|
* move tree includes to their own directoryLibravatar Tony Crisci2018-03-29
|
* sway: change all sway_log to wlr_logLibravatar Dominique Martinet2018-01-05
|
* Add minimal config subsystemLibravatar emersion2017-12-05
|
* Add exec and exec_always commandsLibravatar emersion2017-12-04
|
* Move everything to sway/old/Libravatar Drew DeVault2017-11-18
|
* UnGNUify the codebaseLibravatar Drew DeVault2017-03-10
|
* Handle allocation failure in commandsLibravatar Drew DeVault2016-12-15
|