summaryrefslogtreecommitdiff
path: root/src/shell_manager.cc
AgeCommit message (Collapse)Author
2019-01-24Fix missing errno includeMaxime Coste
2019-01-20Refactor RegexIterator to use a SentinelMaxime Coste
2018-12-27Use fork instead of vfork on CYGWINMaxime Coste
Fixes #2653
2018-12-07Use _exit() after vfork()Jason Felice
Closes #2620 The docs for Mac OS X's vfork() requires it, and _exit() conforms to POSIX.1-2008. http://man7.org/linux/man-pages/man2/_exit.2.html
2018-12-06Use a dummy function for SIGPIPE instead of SIG_IGNMaxime Coste
SIG_IGN is inherited after 'execve' and requires us to reset that signal handler, which does not work well with vfork on OSX. Using an empty function does the trick and will be auto reset to default on exec.
2018-11-27Support KAKOUNE_POSIX_SHELL environment variable to choose the shell pathMaxime Coste
The shell will always be run with 'sh' as argv[0] to make shells such as busybox sh supported. Closes #2547
2018-11-27ShellManager: Use vfork instead of forkMaxime Coste
When large buffers have been opened, copying Kakoune's memory page descriptors can get pretty slow, making fork more expensive than necessary. vfork avoids that problem. While not strictly conforming, it seems the few calls we do before execve (open, close, dup2 and set_signal_handler) would not cause any problems on platforms we care about.
2018-08-29Use shell specific quoting for env varsMaxime Coste
Add a test case to validate roundtrips between Kakoune and the shell.
2018-07-23Restore SIGPIPE handler to default before spawning shellMaxime Coste
Fixes #2238
2018-06-28Fix wrong logic for moving filedescriptors leading to closed stdinMaxime Coste
With this fix, tests can now use /dev/null as stdin. Fixes #2165
2018-05-26Do not expose C++ typeid().name to user facing errors on wrong option typeMaxime Coste
Fixes #2079
2018-04-07Make FaceRegistry scopedMaxime Coste
set-face now takes a scope argument, and faces can be overridden on a buffer or window basis. colorscheme apply on global scope, which should be good enough for now. Fixes #1411
2018-04-01Restore previous status line after notifying wait for shellMaxime Coste
Fixes prompt getting erased by the wait for shell message, and having to manually trigger a redraw to see it again.
2018-03-30Support full redraws during shell execution and handle resize thereMaxime Coste
Fixes #1973
2018-03-25Remove contains_that and use any_of to be closer to the c++ stdlibMaxime Coste
2018-03-13ranges: Add transform overload taking directly a pointer to memberMaxime Coste
This overload will forward to the general transform implementation using std::mem_fn to generate a callable.
2018-02-18ShellManager: init from a static list of env varsMaxime Coste
No need to go through a static list and then copy them one by one in a vector.
2018-01-11Remove extraneous face when clearing status lineDelapouite
2017-06-07Use microseconds instead of milliseconds for built-in profilingMaxime Coste
2017-06-07Use range based find_if wrapper for finding shell env varsMaxime Coste
2017-04-22Set stdin to /dev/null instead of closing it when we dont have data to pipe ↵Maxime Coste
to child Fixes #1330 Fixes #1331
2017-04-17When not sending data to a subprocess, close its stdinMaxime Coste
We were letting stdin untouched, which meant child processes had access to our terminal input. That meant `!fmt` was trying to read from our terminal input and catching keystrokes. Fixes #1281
2017-03-16Fixes some clang-tidy warning and add a few missing meta.hh includeMaxime Coste
2017-03-16Try to clean up option include a bitMaxime Coste
2017-03-15Migrate WithBitOps template specialization to with_bit_ops functionMaxime Coste
This way we dont depend on knowing the base template to enable bit ops on an enum type.
2017-02-03Fix some bugs in non blocking pipe writingMaxime Coste
2017-02-03Make piping data into shell commands non blockingMaxime Coste
Fixes #1180
2017-01-08Apply clang-tidy modernize to the codebaseMaxime Coste
2016-12-20Fix getting path confstr, the returned size includes the zero terminatorMaxime Coste
Closes #1047
2016-12-15Use a POSIX guaranteed way of getting the shell pathMaxime Coste
2016-12-03Read as much as possible data from shell processes on each read eventMaxime Coste
We were reading at most 1024 bytes every time, going back to the event loop.
2016-12-01Make FDWatcher support Read, Write and Except events, instead of just ReadMaxime Coste
2016-11-30Hide the waiting for shell message once the shell returnsMaxime Coste
2016-11-30Use a Timer for Shell waiting notificationMaxime Coste
Without a timer we were relying on other event sources to wake us up to display the information, which was usually a NormalIdle or a filesystem check timer.
2016-11-28Cleanup include dependencies a bitMaxime Coste
2016-10-29Display a status line message when Kakoune is waiting on a shell to completeMaxime Coste
If a shell commands takes more than 1s to execute, a message will appear on the status line notifying the user, along with the time Kakoune has been waiting for.
2016-10-10Convert some uses of lambda to more concise std::mem_fnMaxime Coste
2016-07-24Introduce chrono.hhMaxime Coste
2016-05-06time window display buffer update in debug profile modeMaxime Coste
2016-04-27Add another missing include in shell_manager.ccMaxime Coste
2016-04-17Add support for env var name completionMaxime Coste
Fixes #659
2016-04-12ShellManager: do not open child stdin if there is no data to write to itMaxime Coste
Fixes #383
2016-02-28Code cleanupMaxime Coste
2015-12-10Fix "unused result" warnings for several system calls.Frank LENORMAND
2015-12-05Refactor some code in shell_manager.ccMaxime Coste
2015-11-27Small cleanupsMaxime Coste
2015-11-27Consolidate writing to fdMaxime Coste
2015-11-21Add a profiling debug flag to get timings for hooks/shell evalMaxime Coste
2015-11-19Introduce a debug flags option to control some tracingMaxime Coste
Support shell|hooks and write traces in debug buffer
2015-10-22Wrap the shell params en env vars in a ShellContext structMaxime Coste