Bad system call when calling msgsnd
Huang Bambo
bambo.huang@gmail.com
Mon Aug 10 07:21:00 GMT 2009
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
More information about the Cygwin
mailing list