RE: Shared memory problem

2005-08-25 Thread Dave Korn
Original Message
>From: CRAIG SORENSEN
>Sent: 25 August 2005 15:56

> I have attached the cygcheck file and a short program that I have copied
> from a tutorial online. I am compiling it as shown here:
> 
> gcc shm_write.c -o shm_write
> 
> There are no errors or warnings when I compile, but whenI go to run, it
> says "Bad system call".

  I can't remember it off the top of my head, but there's a parameter you
have to add in to your %CYGWIN% environment variable to actually *enable*
the cygserver functionality.

  Ah.  Found it.  From http://cygwin.com/cygwin-ug-net/using-cygwinenv.html

(no)server - if set, allows client applications to use the Cygserver
facilities. This option must be enabled explicitely on the client side,
otherwise your applications won't be able to use the XSI IPC function calls
(msgget, semget, shmget, and friends) successfully. These function calls
will return with ENOSYS, "Bad system call".


cheers,
  DaveK
-- 
Can't think of a witty .sigline today


--
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/



Re: Shared memory problem

2005-08-25 Thread Igor Pechtchanski

Ugh, top-posting.  Reformatted.

On Thu, 25 Aug 2005, CRAIG SORENSEN wrote:


> From: Igor Pechtchanski <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> To: CRAIG SORENSEN <[EMAIL PROTECTED]>
> CC: [EMAIL PROTECTED]


.  Thanks.


> On Thu, 25 Aug 2005, CRAIG SORENSEN wrote:
>
> > I have followed the instructions in the README file and the messages
> > already sent about this subject. The cygserver is set up and running,
> > but I am still getting a Bad system call when I run a simple program
> > with  and . What could I be doing wrong?
>
> *Could* be lots of things.  Nobody knows which one, though, since you
> haven't posted any details about your system or the program you're
> running.
>
> Please post a complete (preferably short) program that fails for you,
> the commands used to compile it, as well as other relevant details as
> requested in the Cygwin problem reporting guidelines at
> , particularly the output of
> "cygcheck -svr".  It would also help to know exactly how you've
> configured your cygserver.
>
> Help us help you,
>Igor

I have attached the cygcheck file and a short program that I have copied
from a tutorial online. I am compiling it as shown here:

gcc shm_write.c -o shm_write

There are no errors or warnings when I compile, but whenI go to run, it
says "Bad system call".

Thanks for the help.


Uh-huh.  You don't have "server" in your CYGWIN environment variable.
Try running your program as "CYGWIN=server ./shm_write".  Please re-read
/usr/share/doc/Cygwin/cygserver.README for more details.
Igor
--
http://cs.nyu.edu/~pechtcha/
 |\  _,,,---,,_ [EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
|,4-  ) )-,_. ,\ (  `'-'Igor Pechtchanski, Ph.D.
   '---''(_/--'  `-'\_) fL  a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. /DA

--
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/



Re: Shared memory problem

2005-08-25 Thread Igor Pechtchanski
On Thu, 25 Aug 2005, CRAIG SORENSEN wrote:

> I have followed the instructions in the README file and the messages
> already sent about this subject. The cygserver is set up and running,
> but I am still getting a Bad system call when I run a simple program
> with  and . What could I be doing wrong?

*Could* be lots of things.  Nobody knows which one, though, since you
haven't posted any details about your system or the program you're
running.

Please post a complete (preferably short) program that fails for you, the
commands used to compile it, as well as other relevant details as
requested in the Cygwin problem reporting guidelines at
, particularly the output of "cygcheck
-svr".  It would also help to know exactly how you've configured your
cygserver.

Help us help you,
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. /DA

--
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/