Exforsys
+ Reply to Thread
Results 1 to 2 of 2

Difference in Commands

This is a discussion on Difference in Commands within the C and C++ forums, part of the Programming Talk category; I want to try out shell commands with C programming. I am confused with the usage of some of the ...

  1. #1
    ashlee is offline Senior Member Array
    Join Date
    Apr 2006
    Answers
    108

    Difference in Commands

    I want to try out shell commands with C programming. I am confused with the usage of some of the commands namely popen(), pclose() spawn and exec. Can anyone tell me the difference in usage between these commands? In what scenarios would a user use the above commands?


  2. #2
    Adrian is offline Senior Member Array
    Join Date
    Apr 2006
    Answers
    124
    popen and pclose commands are used by users for reading the standard output or also for writing to the standard input of the command they invoke in a very efficient and easier manner. The commands system() is used for carrying out the execution of commands given by user in the command prompt. spawn and exec are used for defining and controlling level of access of users at various levels as per needs of user.


Latest Article

Network Security Risk Assessment and Measurement

Read More...