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="Keith Thompson, post: 4081714"] <joke>But 0! is 1.</joke> How sure are you that "rnews < D_elricf.3aa" is returning a non-zero status? It might just be a problem with rnews command. If so, there's not much that system() can do about it. All the standard says about this is: If the argument is not a null pointer, and the system function does return, it returns an implementation-defined value. It may be reasonable to assume, on your particular implementation, that the result returned by system() is related to the exit status of the invoked program. But you should check your implementation's documentation. The input redirection might have some effect on the handling of the exit status; for example, I can imagine that you might be getting the status of the command processor that invoked the command "rnews < D_elricf.3aa" rather than the status of the "rnews" command. If there is a problem with your implementation's system() function, you'll need to ask about it in a forum that deals with your implementation, perhaps comp.os.ms-windows.programmer.win32 or one of the microsoft.* groups. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C Programming
system() always returns 0?
Top