[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
can't create default pager object
From: |
Ben Asselstine |
Subject: |
can't create default pager object |
Date: |
Sun, 18 Mar 2007 14:06:01 -0400 |
Hello,
In trying to debug tmpfs I have made a small program to illustrate a
bug I've been experiencing with the default_pager_object interface.
The call to default_pager_object_create returns -308, which apparently
means that the server died (EMIG_SERVER_DIED).
I ran this as a normal user and the permissions on
/servers/default-pager are wide open. I get the same error when
running as root.
I would appreciate some feedback on this issue, or some pointers about
how I can debug this.
Here's the test program:
v+
#include <hurd.h>
#include <fcntl.h>
#include <hurd/paths.h>
#include <error.h>
#include "default_pager_U.h"
int
main (int argc, char **argv)
{
size_t allocsize = 1024;
mach_port_t memobj = MACH_PORT_NULL;
default_pager = file_name_lookup (_SERVERS_DEFPAGER, O_EXEC, 0);
if (default_pager == MACH_PORT_NULL)
error (0, errno, _SERVERS_DEFPAGER);
error_t err = default_pager_object_create (default_pager, &memobj, allocsize);
mach_port_deallocate (mach_task_self (), default_pager);
if (err == 0)
{
error (0, 0, "success!!");
mach_port_deallocate (mach_task_self (), memobj);
}
else
error (0, errno, "can't create object of %d bytes: err is %d",
allocsize, err);
return err;
}
v-
I built it with this Makefile:
v+
HURDSRC = /devel4/bing/hurd
CFLAGS = -D_GNU_SOURCE -Wall -g -I$(HURDSRC)
SRC = default_pagerUser.c pdex.c
OBJ = $(SRC:%.c=%.o)
PROGRAM = pdex
all: $(PROGRAM)
default_pagerUser.c default_pager_U.h: /include/hurd/default_pager.defs
mig -s -user default_pagerUser.c /include/hurd/default_pager.defs\
-server /dev/null -header default_pager_U.h
$(PROGRAM): $(OBJ)
gcc -o $@ $^
clean:
rm -f $(PROGRAM) $(OBJ) default_pagerUser.c default_pager_U.h
v-
Please excuse the lack of tabs.
regards,
Ben
- can't create default pager object,
Ben Asselstine <=