Re: could not create shared memory segment: Function not

Randy Yates <[email protected]> Sun, 16 Jan 2005 16:38:42 -0500
Newsgroups gmane.comp.db.postgresql.cygwin
Organization The Universal Church of Christ
Message-ID <[email protected]>
PS: Yes, I've searched the postgres archives for this problem and yes
I've seen many similar references to it and yes I've read the
FAQ_MSWIN file and yes I've ensured my cygwin binaries are before my
windows binaries in my PATH. And I STILL cannot get this to
work. Please help!

PSS: I've also created the small shmget test function that's attached
and it works fine with cygserver. I'm using cygserver, not ipc-daemon2
as stated in the FAQ_MSWIN
-- 
%  Randy Yates                  % "And all that I can do
%% Fuquay-Varina, NC            %  is say I'm sorry, 
%%% 919-577-9882                %  that's the way it goes..."
%%%% <[email protected]>           % Getting To The Point', *Balance of Power*, ELO
http://home.earthlink.net/~yatescr


---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings
smtest.c (application/octet-stream, 626 B)
#include <stdio.h>
#include <sys/types.h>
#include <sys/ipc.h> 
#include <sys/shm.h> 

key_t key; /* key to be passed to shmget() */ 
int shmflg; /* shmflg to be passed to shmget() */ 
int shmid; /* return value from shmget() */ 
int size; /* size to be passed to shmget() */ 


int main(int argc, char* argv[])
{
   key = 1;
   size = 1081344;
   shmflg = 03600;

   printf("hello?\n");
   if ((shmid = shmget (key, size, shmflg)) == -1) 
   {
      printf("*************shmget: shmget failed\n"); 
      exit(1); 
   } 
   else 
   {
      printf("**************shmget: shmget returned %d\n", shmid);
      exit(0);
   }
}