MMap failed with code 22

Jeremy Allison jallison at whistle.com
Fri Jul 18 16:41:19 GMT 1997


Dave,

	I don't have access to a DEC Ultrix4.4 machine to
test the mmap code on. The fragment of code from 
shmem.c is :

  smb_shm_header_p = (struct SmbShmHeader *)mmap( NULL, size, PROT_READ
| 
			PROT_WRITE, MAP_FILE | MAP_SHARED, smb_shm_fd, 0);
   /* WARNING, smb_shm_header_p can be different for different processes
mapping 		the same file ! */
   if (smb_shm_header_p  == (struct SmbShmHeader *)(-1))
   {
      DEBUG(0,("ERROR smb_shm_open : mmap failed with code
%d\n",errno));

As you can see, PROT_READ,PROT_WRITE and MAP_SHARED are all
set in the call.

Can you send me a man page for mmap on DEC Ultrix 4.4 so
I can determine what may be in error with the call.

Thanks,

	Jeremy Allison.
	Samba Team.


More information about the samba mailing list