Commit graph

65 commits

Author SHA1 Message Date
ridiculousfish
20d7a142c5 Enable fishd-less mode by default.
Shell instances now synchronize universal variables using the
filesystem. fishd should no longer be launched by default.
2014-05-29 13:05:47 -07:00
ridiculousfish
9ae06c541f Remove inotify-based universal notifier
The inotify notifier is fragile, fails on travis, and fails to compile
on certain Linux kernels. It doesn't appear to work as well as the named
pipe mechanism. Best to just get rid of it.
2014-05-29 09:57:56 -07:00
ridiculousfish
147403f958 Use mkostemp in universal variables when available 2014-05-15 14:37:44 +08:00
ridiculousfish
38c52cf9b5 Formatting fixes 2014-05-15 14:31:57 +08:00
ridiculousfish
64c1c75c42 Improve universal variable error messages 2014-05-15 14:27:06 +08:00
ridiculousfish
2b11d1060c Make initialize_synchronizes_via_fishd default to false. Add some
logging support to universal variables.
2014-05-15 10:49:06 +08:00
ridiculousfish
a73b903df9 Null notifier to support fishd synchronization, so we can select the
synchronization mechanism at runtime
2014-05-14 15:03:44 +08:00
ridiculousfish
e97bec10ea Remove needs_polling from universal_notifier_t. Add some expository
comments.
2014-05-07 14:22:05 -07:00
ridiculousfish
7763718b60 Further cleanup and rationalization of named pipe universal notifier. 2014-05-06 14:10:55 -07:00
ridiculousfish
8a263952ad Fix named pipe universal notifier. No more threads. Tests now pass. 2014-05-05 23:33:05 -07:00
ridiculousfish
f27232bd0a Initial work on strategy_named_pipe universal notifier. 2014-05-04 15:06:40 -07:00
ridiculousfish
7e44bcfd8a Make inotify-based universal variable notifier tests pass 2014-05-03 19:57:20 -07:00
ridiculousfish
47a81c2b39 Re-establish inotify watch when file is deleted 2014-05-03 16:31:11 -07:00
ridiculousfish
186b0f62eb Early implementation of inotify-based universal variable notifier for
Linux
2014-05-01 16:44:37 -07:00
ridiculousfish
60c8012e9e Implement notifyd-based notification strategy for universal variables
(OS X specific)
2014-04-30 15:50:03 -07:00
ridiculousfish
7a5a277c29 Implement universal variable deletion. Adopt shared memory uvar notification. 2014-04-29 17:03:00 -07:00
ridiculousfish
38da76804e Implement shared memory strategy for universal variable notifications 2014-04-29 14:14:50 -07:00
ridiculousfish
a949f0b0c3 Move universal variable callbacks out from under the lock, to avoid a
possible deadlock on reentrancy
2014-04-29 11:28:00 -07:00
ridiculousfish
91aadab3dd Enhance file_id_t to have richer information, to guard against inode
recycling on Linux filesystems
2014-04-28 15:14:33 -07:00
ridiculousfish
c3425bc55f Include a header to permit building on Linux 2014-04-27 23:52:09 -07:00
ridiculousfish
753c42a3d5 Merge branch 'master' into death_of_fishd 2014-04-27 18:53:35 -07:00
ridiculousfish
58ebdd4a7e Attempt to silence some warnings 2014-04-27 17:23:19 -07:00
ridiculousfish
d7f22a0c27 Correctly invoke callbacks with fishd-less universal variables. All
tests now pass.
2014-04-27 16:53:07 -07:00
ridiculousfish
3b4794ae94 Implement atomic loading/saving of fishd file within fish, eventually
permitting removal of fishd. Universal variables test passes, others
fail.
2014-04-27 13:35:32 -07:00
ridiculousfish
6a94b51cba Beginning steps towards teaching the universal variable system to read
the fishd file directly, instead of fetching it through fishd
2014-04-26 11:41:34 -07:00
ridiculousfish
bf14668b2a Migrate machine and hostname identification from fishd.cpp to
env_universal_common.cpp, so that fish can use it
2014-04-25 17:45:22 -07:00
ridiculousfish
a475dd15e6 Migrate universal variables to env_var_t structure. Encapsulate
universal variable storage into a class for better testability.
2014-04-25 16:09:26 -07:00
ridiculousfish
9718e70260 Naive reimplementation of utf2wcs and wcs2utf in
env_universal_common.cpp. These use the new utf8 functions exposed in
utf8.h. This will allow us to drop the iconv dependency.
2014-03-23 13:06:24 -07:00
ridiculousfish
06eb271bda Changes full_escape to not generate \x escapes for non-ASCII characters.
Partially reverts 51de269 . Fixes #1225
2014-03-22 14:46:23 -07:00
ridiculousfish
be33d3f2a4 Revert "Merge pull request #1317 from pullreq/cpp"
This reverts commit 74135c0600, reversing
changes made to 6d749789ce.

See discussion in #1317
2014-02-28 02:16:48 -08:00
Geoff Nixon
18dd6f58e3 Fixes .c -> .cpp in comments. For doxygen. 2014-02-27 06:23:40 -08:00
ridiculousfish
9f6223311e Large cleanup and refactoring of unescape() function. 2013-11-24 22:58:39 -08:00
Konrad Borowski
fd25a6425c Fix two memory leaks. 2013-10-19 22:10:26 +02:00
ridiculousfish
aaa0c25ff7 Large set of changes to how PATH is handled. Changed fish to no longer modify PATH in share/config.fish. Introduced variable fish_user_paths, and a glue function __fish_reconstruct_path that splices together PATH with fish_user_paths. Changed fish to no longer validate changes to PATH unless the paths are new (i.e. don't recheck what's already there). Modified certain sets to store const wchar_t instead of wcstring to save a few allocations.
https://github.com/fish-shell/fish-shell/issues/527
2013-02-19 18:05:20 -08:00
ridiculousfish
4416753df0 More cleanup based on static analysis
https://github.com/fish-shell/fish-shell/issues/575
2013-02-16 02:38:13 -08:00
ridiculousfish
dc54ec5b2b Migrate connection_t from storing a huge buffer to a std::vector 2013-02-16 01:28:46 -08:00
ridiculousfish
b682c4102e Eliminate next pointer from connection_t, turn connections into a std::list 2013-02-16 00:32:15 -08:00
ridiculousfish
6d522e6ed6 First round of fixes based on cppcheck
https://github.com/fish-shell/fish-shell/issues/575
2013-02-16 00:02:40 -08:00
ridiculousfish
2a7fc9c3a5 Clean up env_var_table_t. Switch from storing var_uni_entry_t* to var_uni_entry_t. Various other cleanups. 2013-02-11 23:16:50 -08:00
ridiculousfish
e07de09460 Big cleanup of env_set. Changed var_table_t to use direct var_entry_t instead of pointers. Changed some ints to bools. 2013-01-19 13:32:06 -08:00
ridiculousfish
552d8f394e Make fishd base its variable files on the MAC address instead of hostname
Fixes https://github.com/fish-shell/fish-shell/issues/183
2013-01-08 02:39:22 -08:00
ridiculousfish
26678682ca Fix indentation of switch statements 2012-11-19 00:31:03 -08:00
ridiculousfish
9992b8eb0e Apply new indentation, brace, and whitespace style 2012-11-18 16:30:30 -08:00
Łukasz Niemier
47df1ae40a Remove trailing whitespaces and change tabs to spaces 2012-11-18 11:23:22 +01:00
ridiculousfish
51de26960c Make escaping consistent for fish <-> fishd protocol
Fix fork guards to work in fishd
https://github.com/fish-shell/fish-shell/issues/339
2012-10-08 14:47:25 -07:00
ridiculousfish
84729c4dfa Additional warnings cleanup, effective C++ violations, dead code removal 2012-08-05 13:24:33 -07:00
ridiculousfish
fdc6c3722a Fixed a bunch of clang analyzer warnings
Simplified some memory allocations by migrating to std::string
2012-08-05 12:01:53 -07:00
ridiculousfish
8185bee4b8 Lots of work towards making fish build without warnings on Mountain Lion, mostly in terms of using size_t instead of int 2012-08-04 11:34:45 -07:00
ridiculousfish
d06d6c6964 Various changes to reduce fish's compiled code size
OS X release build executable size dropped from 672k to 511k
2012-07-17 12:47:01 -07:00
ridiculousfish
176a3913aa Fix for https://github.com/fish-shell/fish-shell/issues/106
Lets us configure and build on FreeBSD
2012-07-10 15:37:16 -07:00