mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-07 01:51:14 -03:00
Fix broken umask, add completions, documentation cleanups, etc
darcs-hash:20051022100605-ac50b-9b6ece502b203bf7690583d57b5b0713de30890c.gz
This commit is contained in:
20
env.c
20
env.c
@@ -15,7 +15,6 @@
|
||||
#include <sys/stat.h>
|
||||
#include <pwd.h>
|
||||
|
||||
|
||||
#if HAVE_NCURSES_H
|
||||
#include <ncurses.h>
|
||||
#else
|
||||
@@ -27,6 +26,7 @@
|
||||
#endif
|
||||
|
||||
#include <term.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "util.h"
|
||||
#include "wutil.h"
|
||||
@@ -385,6 +385,24 @@ void env_set( const wchar_t *key,
|
||||
fish_setlocale(LC_ALL,val);
|
||||
}
|
||||
|
||||
if( wcscmp( key, L"umask" ) == 0)
|
||||
{
|
||||
wchar_t *end;
|
||||
int mask;
|
||||
|
||||
if( val && wcslen(val) )
|
||||
{
|
||||
errno=0;
|
||||
mask = wcstol( val, &end, 8 );
|
||||
|
||||
if( !errno && !*end )
|
||||
{
|
||||
umask( mask );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Zero element arrays are internaly not coded as null but as this placeholder string
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user