version 1.1, 1999/09/26 20:53:36 |
version 1.2, 1999/09/30 05:43:33 |
|
|
#include "fdlim.h" |
#include "fdlim.h" |
#include "minfd.h" |
#include "minfd.h" |
|
|
#ifdef _PATH_BSHELL |
|
#define DEFAULT_SHELL _PATH_BSHELL |
|
#else |
|
#define DEFAULT_SHELL "/bin/sh" |
|
#endif |
|
|
|
static int |
static int |
_get_permanent_fd(const char *shellpath) |
_get_permanent_fd(const char *shellpath) |
{ |
{ |
|
|
if ((pwd = getpwuid(getuid()))) |
if ((pwd = getpwuid(getuid()))) |
shellpath = pwd->pw_shell; |
shellpath = pwd->pw_shell; |
if (!shellpath) |
if (!shellpath) |
shellpath = DEFAULT_SHELL; |
shellpath = _PATH_BSHELL; |
} |
} |
if ((shell = strrchr(shellpath, '/'))) |
if ((shell = strrchr(shellpath, '/'))) |
shell++; |
shell++; |