delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/01/19/20:16:17

From: mh AT mike DOT franken DOT de (Michael Hirmke)
Subject: Re: system() problem
19 Jan 1998 20:16:17 -0800 :
Message-ID: <6m4yPPWppfB.cygnus.gnu-win32@mike.franken.de>
References: <C125658A DOT 0031FB17 DOT 00 AT opel DOT hu DOT cyberlink DOT eds DOT com>
Mime-Version: 1.0
To: gnu-win32 AT cygnus DOT com

Hi Dezso,

[...]
>#include <stdlib.h>
>int main (void)
>{
>        int i;
>        i = system ("dir");
>        return i;
>}
>
>When I run the program it prints "failure!!!!!" and returns -1.
>The system() did not work with any other arguments I tried except NULL when
> it returned 1 (and
>there was no failure message then).
>
>Is it a bug or did I do something wrong?

Don't know, what you did wrong. Your code works here without any
problem. Even if not, I can't imagine, who or what is responsible for
the "failure" printout. Neither dir nor the system function ever print
such a message.

>
>Thank you,
>
>     Dezso Kovacs

Bye.
Michael.
--
Michael Hirmke           | Telefon +49 (911) 557999
Georg-Strobel-Strasse 81 | FAX     +49 (911) 557664
90489 Nuernberg          | E-Mail  mailto:mh AT mike DOT franken DOT de
                         | WWW     http://minimike.franken.de/
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019