| delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| X-SWARE-Spam-Status: | No, hits=-0.1 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_55,J_CHICKENPOX_65,SARE_MSGID_LONG40,SPF_PASS |
| X-Spam-Check-By: | sourceware.org |
| MIME-Version: | 1.0 |
| In-Reply-To: | <4A7FC6C1.2070005@realmofthesh.com> |
| References: | <4A7FC6C1 DOT 2070005 AT realmofthesh DOT com> |
| Date: | Mon, 10 Aug 2009 15:20:49 +0800 |
| Message-ID: | <f4d6f44b0908100020o197b0314od52bcc862345df82@mail.gmail.com> |
| Subject: | Re: Bad system call when calling msgsnd |
| From: | Huang Bambo <bambo DOT huang AT gmail DOT com> |
| To: | cygwin AT cygwin DOT com |
| X-IsSubscribed: | yes |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
Run "net star cygserver" first
2009/8/10 Scott <cygwin AT realmofthesh DOT com>
>
> When I compile and run the following example code within cygwin (gcc msgs=
nd.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() {
> =A0 int msqid =3D 0;
> =A0 int rc;
> =A0 size_t msgsz;
> =A0 struct {
> =A0 =A0 =A0 =A0long int mtype;
> =A0 =A0 =A0 char =A0 =A0 mtext[256];
> =A0 } mymsg;
>
> =A0 msgsz =3D 256;
> =A0 mymsg.mtype =3D 1;
> =A0 rc =3D msgsnd(msqid, &mymsg, msgsz, =A0IPC_NOWAIT);
> =A0 return 0;
> }
>
>
> --
> Problem reports: =A0 =A0 =A0 http://cygwin.com/problems.html
> FAQ: =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 http://cygwin.com/faq/
> Documentation: =A0 =A0 =A0 =A0 http://cygwin.com/docs.html
> Unsubscribe info: =A0 =A0 =A0http://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
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |