Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C Programming
system() always returns 0?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="barry, post: 4081703"] Has anyone encountered a problem with the Microsoft C 5.0 compiler always returning a 0 from the system() call, no matter what the actual command executed by system() returns? Is there a fix for this or am i misunderstanding something fundamental about the way the system() call works in msc5.0? (Like the command.com always returning the 0, which system(), in turn, returns to my program?) I'm trying to determine whether or not the executed command succeeded or not by looking at the completion code from system, ala: char buf[BUFSIZ]; sprintf(buf,"rnews < D_elricf.3aa"); if (!system(buf)) perror(buf); and i'm having a hard time of it since system() always (seems) to return 0! [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C Programming
system() always returns 0?
Top