Menu

fork() and exec()

User0815
2008-09-24
2012-09-26
  • User0815

    User0815 - 2008-09-24

    Hi there,

    first of all plz excuse my poor english skills. I wanted to know if there are any alternatives/similiar functions to fork() and exec() i could use on a windows computer? im using dev-c++ and i thought it was possible to start other programms within my source code; like batch files.
    I'd be glad if anyone could help me out.

    Greetings

     
    • cpns

      cpns - 2008-09-24

      The concept of fork() is not supported at all in Windows, but beyond that there are several ways of launching child or independent processes. They each have different characteristics and functionality so read the documentation carefully to select the most appropriate to your needs.

      There is a family of _spawn.. and _exec.. functions, and the system() function described here http://msdn.microsoft.com/en-us/library/aa272867(VS.60).aspx .

      Additionally there is the somewhat higher level ShellExecute() already suggested: http://msdn.microsoft.com/en-us/library/bb762153(VS.85).aspx

      Clifford

       
    • Anonymous

      Anonymous - 2008-09-24

      See ShellExecute() and ShellExecuteEx() Windows API functions.

      HTH.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.