public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* system
@ 2002-07-10  3:32 Bernardet Karim
  2002-07-10  4:06 ` system jalonso
  0 siblings, 1 reply; 3+ messages in thread
From: Bernardet Karim @ 2002-07-10  3:32 UTC (permalink / raw)
  To: cygwin

Hello  !

When I compile the code below under cygwin, all is ok when i run it in =
the
cygwin shell, but if i run it in a MSDOS console I just have  the result =
of
the printf ....

....
{
system("c:/tempo/cygwin/bin/ls c:/tempo ");
printf("c:/tempo/cygwin/bin/ls c:/tempo ");
}

Thanks for your help ...




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: system
  2002-07-10  3:32 system Bernardet Karim
@ 2002-07-10  4:06 ` jalonso
  2002-07-10 16:22   ` system Karim
  0 siblings, 1 reply; 3+ messages in thread
From: jalonso @ 2002-07-10  4:06 UTC (permalink / raw)
  To: Bernardet Karim; +Cc: cygwin

Hello,

The "system" call works through the use of /bin/sh (without the absolute path 
specification), so "sh" must be in your path for "system" to work.  Someone 
please correct me if I'm wrong.

If this is in fact the problem, then you must have copied cygwin1.dll to 
someplace in your path and not add /bin to your path.  At least on the Cygwin 
installation I'm using at the moment, -mno-cygwin will result in the printf-
only behavior.

I hope this helps.

Jason Alonso

Quoting Bernardet Karim <Karim.Bernardet@inln.cnrs.fr>:

> Hello  !
> 
> When I compile the code below under cygwin, all is ok when i run it in =
> the
> cygwin shell, but if i run it in a MSDOS console I just have  the result =
> of
> the printf ....
> 
> ....
> {
> system("c:/tempo/cygwin/bin/ls c:/tempo ");
> printf("c:/tempo/cygwin/bin/ls c:/tempo ");
> }
> 
> Thanks for your help ...
> 
> 
> 
> 
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting:         http://cygwin.com/bugs.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/
> 
> 




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: system
  2002-07-10  4:06 ` system jalonso
@ 2002-07-10 16:22   ` Karim
  0 siblings, 0 replies; 3+ messages in thread
From: Karim @ 2002-07-10 16:22 UTC (permalink / raw)
  To: cygwin


----- Original Message -----
From: <jalonso@mit.edu>
To: "Bernardet Karim" <Karim.Bernardet@inln.cnrs.fr>
Cc: <cygwin@cygwin.com>
Sent: Wednesday, July 10, 2002 9:32 AM
Subject: Re: system


> Hello,
>
> The "system" call works through the use of /bin/sh (without the absolute
path
> specification), so "sh" must be in your path for "system" to work.
Someone
> please correct me if I'm wrong.
>
> If this is in fact the problem, then you must have copied cygwin1.dll to
> someplace in your path and not add /bin to your path.  At least on the
Cygwin
> installation I'm using at the moment, -mno-cygwin will result in the
printf-
> only behavior.
>
> I hope this helps.
>
> Jason Alonso
>
> Quoting Bernardet Karim <Karim.Bernardet@inln.cnrs.fr>:
>
> > Hello  !
> >
> > When I compile the code below under cygwin, all is ok when i run it in =
> > the
> > cygwin shell, but if i run it in a MSDOS console I just have  the result
=
> > of
> > the printf ....
> >
> > ....
> > {
> > system("c:/tempo/cygwin/bin/ls c:/tempo ");
> > printf("c:/tempo/cygwin/bin/ls c:/tempo ");
> > }
> >
> > Thanks for your help ...
> >
> >
> >
> >
> > --
> > Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> > Bug reporting:         http://cygwin.com/bugs.html
> > Documentation:         http://cygwin.com/docs.html
> > FAQ:                   http://cygwin.com/faq/
> >
> >
>
>
>

First, thanks a lot for your help

using -mno-cygwin with gcc, system("c:\\tempo\\cygwin\\bin\\ls ") works in a
MSDOS shell
but without -mno-cygwin and if I copy cygwin1.dll in c:\windows\system, it
doesn t work in a MSDOS shell

i could use -mno-cygwin but in the  case i have to use winsock :((

Karim.





--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-07-10 21:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-10  3:32 system Bernardet Karim
2002-07-10  4:06 ` system jalonso
2002-07-10 16:22   ` system Karim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).