This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Still trouble with IPC/cygipc
- From: Charles Wilson <cygwin at cwilson dot fastmail dot fm>
- To: cygwin at cygwin dot com
- Date: Sat, 14 Feb 2004 04:02:39 -0500
- Subject: Re: Still trouble with IPC/cygipc
- References: <000601c3f2c2$c2717ae0$0202a8c0@duron>
Frank Wuebbeling wrote:
Hi,
I'm still having trouble understanding how IPC is supposed to be working now. I
used to be running apache 2.0, but that fails now due to lots of IPC problems.
cygcheck tells me my installation has cygipc version 2.03-2, cygwin is at
1.5.7-1, and yes, I reinstalled cygwin after installing cygipc so that my
include files point to the new ipc distribution.
No, that means you now have:
/usr/include/sys/ipc.h <<< from cygwin
/usr/include/cygipc/sys/ipc.h <<< from cygipc
Which is good, right, and proper.
From /usr/share/doc/Cygwin/cygipc-*.README, you need to
1) compile with -I/usr/include/cygipc
2) link with -lcygipc
If you don't do #1, you end up with cygwin/cygserver's declarations. If
you don't do #2, you end up with cygwin/cygserver's implementations.
ipcs then gives me
wuebbel% ipcs
Bad system call
And finally, ipcs is the cygwin/cygserver version. You want ipcscygipc.
(you did upgrade cygutils to 1.2.4-1, right? And then re-installed
cygwin-1.5.7 AGAIN after doing so?)
just like any call to shmget as in:
#include <sys/ipc.h>
#include <sys/shm.h>
main()
{
printf("%d\n",shmget(1,10,IPC_CREAT|IPC_PRIVATE));
}
wuebbel% cc x.c
wuebbel% a.exe
Bad system call
Yep, you're using cygwin's routines, which expect that cygserver is
running. It's not, so that's a "bad system call."
Or, you could bail on cygipc and just use cygserver instead. Crank up
the cygserver daemon (see /usr/share/doc/cygserver* ? I think...) and
try your tests again.
cygcheck(edited):
In the future, do not paste the cygcheck output but rather attach it.
That way, it won't clog the search engine results with false hits for
"XFree86" etc.
--
Chuck
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/