mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-10 22:10:21 +02:00
* net_db.c (scm_gethost, scm_getnet, scm_getproto, scm_getserv):
Return #f on end-of-file when scanning table (i.e. when called with no arguments). Try to catch errors, when we can. * posix.c (scm_getgrgid, scm_getpwuid): Same.
This commit is contained in:
parent
095936d24f
commit
3d781d4935
1 changed files with 13 additions and 1 deletions
|
@ -259,6 +259,11 @@ scm_getpwuid (user)
|
|||
{
|
||||
SCM_DEFER_INTS;
|
||||
SCM_SYSCALL (entry = getpwent ());
|
||||
if (! entry)
|
||||
{
|
||||
SCM_ALLOW_INTS;
|
||||
return SCM_BOOL_F;
|
||||
}
|
||||
}
|
||||
else if (SCM_INUMP (user))
|
||||
{
|
||||
|
@ -324,7 +329,14 @@ scm_getgrgid (name)
|
|||
ve = SCM_VELTS (result);
|
||||
SCM_DEFER_INTS;
|
||||
if (SCM_UNBNDP (name) || (name == SCM_BOOL_F))
|
||||
SCM_SYSCALL (entry = getgrent ());
|
||||
{
|
||||
SCM_SYSCALL (entry = getgrent ());
|
||||
if (! entry)
|
||||
{
|
||||
SCM_ALLOW_INTS;
|
||||
return SCM_BOOL_F;
|
||||
}
|
||||
}
|
||||
else if (SCM_INUMP (name))
|
||||
SCM_SYSCALL (entry = getgrgid (SCM_INUM (name)));
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue