aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--env.c11
-rw-r--r--fishd.c5
-rw-r--r--init/fish_function.fish18
4 files changed, 21 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 721b5304..cd934e6b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,4 @@
+
2005-10-03 Netocrat <netocrat@dodo.com.au>
* fishd.c, common.c: Make lock-file name include hostname for increased protection on shared NFS /tmp.
diff --git a/env.c b/env.c
index e7fb35d5..578e0350 100644
--- a/env.c
+++ b/env.c
@@ -186,7 +186,7 @@ static void start_fishd()
sb_init( &cmd );
pw = getpwuid(getuid());
- debug( 3, L"Spawning new copy of fishd" );
+ debug( 2, L"Spawning new copy of fishd" );
if( !pw )
{
@@ -352,6 +352,9 @@ void env_init()
al_init( &l );
expand_variable_array( path, &l );
+
+ debug( 3, L"PATH is %ls", path );
+
const wchar_t *path_el[] =
{
@@ -365,6 +368,9 @@ void env_init()
for( j=0; path_el[j]; j++ )
{
int has_el=0;
+
+ debug( 3, L"Check directory %ls", path_el[j] );
+
for( i=0; i<al_get_count( &l); i++ )
{
@@ -381,6 +387,7 @@ void env_init()
if( !has_el )
{
string_buffer_t b;
+ debug( 3, L"directory %ls was missing", path_el[j] );
sb_init( &b );
sb_append2( &b, path,
ARRAY_SEP_STR,
@@ -394,6 +401,8 @@ void env_init()
}
}
+ debug( 3, L"After: PATH is %ls", path );
+
al_foreach( &l, (void (*)(const void *))&free );
al_destroy( &l );
diff --git a/fishd.c b/fishd.c
index 7e4f7a7b..9f0eee16 100644
--- a/fishd.c
+++ b/fishd.c
@@ -268,6 +268,9 @@ static void daemonize()
case 0:
{
+ /*
+ Make fish ignore the HUP signal.
+ */
struct sigaction act;
sigemptyset( & act.sa_mask );
act.sa_flags=0;
@@ -278,7 +281,7 @@ static void daemonize()
default:
{
- debug( 0, L"Parent calling exit" );
+ debug( 0, L"Parent process exiting (This is normal)" );
exit(0);
}
}
diff --git a/init/fish_function.fish b/init/fish_function.fish
index 2083757a..1359e170 100644
--- a/init/fish_function.fish
+++ b/init/fish_function.fish
@@ -6,10 +6,8 @@
function _contains_help -d "Helper function for contains"
set bullet \*
- if count $LANG >/dev/null
- if test (expr match $LANG ".*UTF") -gt 0
- set bullet \u2022
- end
+ if expr match "$LANG" ".*UTF" >/dev/null
+ set bullet \u2022
end
echo \tcontains - Test if a word is present in a list\n
@@ -223,10 +221,8 @@ function prompt_pwd -d "Print the current working directory, ellipsise it if it
#Write ellipsis character if known to be using UTF
#else use $
set -l ellipsis '$' #default
- if count $LANG >/dev/null
- if test (expr match $LANG ".*UTF") -gt 0
- set ellipsis \u2026
- end
+ if expr match "$LANG" ".*UTF" >/dev/null
+ set ellipsis \u2026
end
printf %s%s $ellipsis (echo $wd|cut -c (echo $len-$max_width-1|bc)- ^/dev/null )
else
@@ -564,10 +560,8 @@ end
function __fish_type_help -d "Help for the type shellscript function"
set bullet \*
-if count $LANG >/dev/null
- if test (expr match $LANG ".*UTF") -gt 0
- set bullet \u2022
- end
+if expr match "$LANG" ".*UTF" >/dev/null
+ set bullet \u2022
end
echo \ttype - Indicate how a name would be interpreted if used as a \n\tcommand name