public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* g++: Problem with system()
       [not found] <00db01bf8d0d$0fa7a700$1d4bb392@petnt1.rpms.ac.uk>
@ 2000-03-16 13:04 ` Martin Trautmann
  2000-03-17 13:43   ` Michael Hirmke
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Trautmann @ 2000-03-16 13:04 UTC (permalink / raw)
  To: cygwin

Hello,

I have a program that calls programs with system(). It also prints out
what it wants to execute. Compiled with linux gcc everything works fine.
But the executable compiled with cygwin has a problem: It only works
when executed in the windows bash. Executed in a DOS-Box it only writes
what he wants to exec but doesn't do anything even if I only call
something simple like "echo ...". In Windows 95 this "doing nothing"
even takes a lot of time but in Windows 98 and NT4 it is very quick.

thank you for help

Martin Trautmann

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

* Re: g++: Problem with system()
  2000-03-16 13:04 ` g++: Problem with system() Martin Trautmann
@ 2000-03-17 13:43   ` Michael Hirmke
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Hirmke @ 2000-03-17 13:43 UTC (permalink / raw)
  To: cygwin

Hi Martin,

>Hello,
>
>I have a program that calls programs with system(). It also prints out
>what it wants to execute. Compiled with linux gcc everything works fine.
>But the executable compiled with cygwin has a problem: It only works
>when executed in the windows bash. Executed in a DOS-Box it only writes
>what he wants to exec but doesn't do anything even if I only call
>something simple like "echo ...". In Windows 95 this "doing nothing"

echo is a builtin command of command.com on Win9x and cmd.exe on
NT4/W2K, so you can't just call it with the system command.
In a bash window the situation is different - even though echo is a
shell builtin, the calling bash can run it. Besides that, there is an
external program named echo.exe, too.
If you want to test your program use something like "notepad", which can
be found through $PATH on all WinXX systems.

>even takes a lot of time but in Windows 98 and NT4 it is very quick.
>
>thank you for help
>
>Martin Trautmann

Bye.
Michael.
-- 
Michael Hirmke           | Telefon +49 (911) 557999
Georg-Strobel-Strasse 81 | FAX     +49 (911) 557664
90489 Nuernberg          | E-Mail  mailto:mh@mike.franken.de
                         | WWW     http://aquarius.franken.de/

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

end of thread, other threads:[~2000-03-17 13:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <00db01bf8d0d$0fa7a700$1d4bb392@petnt1.rpms.ac.uk>
2000-03-16 13:04 ` g++: Problem with system() Martin Trautmann
2000-03-17 13:43   ` Michael Hirmke

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).