external processes without waiting for return

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • changereality@gmail.com

    external processes without waiting for return

    In php how do I call an external script or program without having php
    waiting for the return?

    exec and system both seem to wait for the return, I don't want this.

  • Janwillem Borleffs

    #2
    Re: external processes without waiting for return

    changereality@g mail.com wrote:[color=blue]
    > In php how do I call an external script or program without having php
    > waiting for the return?
    >[/color]

    On *nix systems, try pushing it to the background:

    exec("command &");


    JW



    Comment

    • NC

      #3
      Re: external processes without waiting for return

      changereality@g mail.com wrote:[color=blue]
      >
      > In php how do I call an external script or program without having php
      > waiting for the return?
      >
      > exec and system both seem to wait for the return, I don't want this.[/color]

      You can still use exec() or system(), but you need to modify your
      command line. On Unix, you can add "&" to yout command line to
      execute your request in the background. On Windows, you can put
      "start" in front of your command line to launch a new instance
      of command interpreter (type "help start" at your command prompt
      for more information).

      Cheers,
      NC

      Comment

      Working...