Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Jan 2007 17:04:53 -0800 (PST)
From:      Kip Macy <kmacy@fsmware.com>
To:        girish r <fmail_girish@yahoo.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: semaphore.h does'nt include fcntl.h ?
Message-ID:  <20070114170439.B29422@demos.bsdclusters.com>
In-Reply-To: <628825.38045.qm@web62001.mail.re1.yahoo.com>
References:  <628825.38045.qm@web62001.mail.re1.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Do you have SysV IPC support in your kernel?

			-Kip

On Sun, 14 Jan 2007, girish r wrote:

> Hello folks,
>
> I am trying to use sem_open(3) but gcc complains that
> O_CREAT and O_EXCL is undeclared. According to the man
> page only semaphore.h needs to be included. But
> including fcntl.h solves the problem.
>
> sem_t *lock = sem_open("example_lock", O_CREAT |
> O_EXCL, 0600, 1);
> Another thing, a program with the above function call
> compiles but when I execute it, it spits out "Bad
> system call (core dump)". Specifically, I am trying to
> run this program given here:
> "http://www.informit.com/articles/article.asp?p=679545&seqNum=3&rl=1".
>
> Thanks for your time.
>
> --girish
>
>
>
> ____________________________________________________________________________________
> Do you Yahoo!?
> Everyone is raving about the all-new Yahoo! Mail beta.
> http://new.mail.yahoo.com
> _______________________________________________
> freebsd-hackers@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070114170439.B29422>