1.5.19-4 Problem with compiled source
Larry Hall (Cygwin)
reply-to-list-only-lh@cygwin.com
Tue Mar 14 03:10:00 GMT 2006
Rich Mayo wrote:
> I am attempting to compile and run a very simple shared memory server
> and client. Although my source compiles with no problem, when I attempt
> to execute, the following is my only output:
>
> Bad system call
>
> I have conducted some experiments and the problem occurs with the very
> first line in my code. The following is the server code up to line that
> causes the error:
>
> /* shm_server.c: Server program to demonstrate shared memory. */
>
> #include "shm_server.h"
>
> int main(void)
> {
> char * shm = NULL; // Shared Memory Pointer
> char * s = NULL; // Dynamic Pointer
>
> key_t key = 5678; // shared memory segment name is '5678'
> char c; // Temporary char
> int shmid; // Shared Memory Segment ID
>
> /* Create the segment. */
> if ((shmid = shmget (key, SHMSZ, IPC_CREAT | 0666)) < 0)
> {
> fprintf (stderr, "shmget failed\n");
> exit (1);
> }
>
> ...
>
> There appears to be something wrong with "shmget". Any suggestions??
>
>
Absolutely! Check out the section in the User's Guide regarding
cygserver <http://cygwin.com/cygwin-ug-net/using-cygserver.html>.
--
Larry Hall http://www.rfk.com
RFK Partners, Inc. (508) 893-9779 - RFK Office
838 Washington Street (508) 893-9889 - FAX
Holliston, MA 01746
--
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/
More information about the Cygwin
mailing list