This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Bad system call when calling msgsnd
- From: Huang Bambo <bambo dot huang at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Mon, 10 Aug 2009 15:20:49 +0800
- Subject: Re: Bad system call when calling msgsnd
- References: <4A7FC6C1.2070005@realmofthesh.com>
Run "net star cygserver" first
2009/8/10 Scott <cygwin@realmofthesh.com>
>
> When I compile and run the following example code within cygwin (gcc msgsnd.c -o msgsnd), I get an error "Bad system call"
>
> This seems to be a bug; it runs fine under linux.
>
> #include <sys/msg.h>
>
> int main() {
> ? int msqid = 0;
> ? int rc;
> ? size_t msgsz;
> ? struct {
> ? ? ? ?long int mtype;
> ? ? ? char ? ? mtext[256];
> ? } mymsg;
>
> ? msgsz = 256;
> ? mymsg.mtype = 1;
> ? rc = msgsnd(msqid, &mymsg, msgsz, ?IPC_NOWAIT);
> ? return 0;
> }
>
>
> --
> Problem reports: ? ? ? http://cygwin.com/problems.html
> FAQ: ? ? ? ? ? ? ? ? ? http://cygwin.com/faq/
> Documentation: ? ? ? ? http://cygwin.com/docs.html
> Unsubscribe info: ? ? ?http://cygwin.com/ml/#unsubscribe-simple
>
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple