cygwin c sem_init
Posted
by
RileyVanZeeland
on Stack Overflow
See other posts from Stack Overflow
or by RileyVanZeeland
Published on 2012-09-24T09:07:42Z
Indexed on
2012/09/24
21:37 UTC
Read the original article
Hit count: 148
if((sem_init(sem, 1, 1)) == 1) perror("error initiating sem");
If I include this line of code my program simply starts and exits. I just started learning how to use semaphores. I'm using cygwin and when this line is commented out the printf's ABOVE this print to console but when include this, nothing happens.
I did the following to get cygserver going-
CYGWIN=server
ran /bin/cygserver-config
ran /usr/sbin/cygserver
for the config it said the cygserver is already running And for the sygserver it saids-
initailaizing complete
failed to created named pipe: is the daemon already running?
fatal error on IPC transport: closing down
Any ideas?
© Stack Overflow or respective owner