exec in background on Windows

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Alan Walkington

    exec in background on Windows

    Folks:

    How can I get an /exec'ed/ process to run in the background on an XP box?

    I have a monitor-like process which I am starting as
    'exec("somethin g.exe");' and, of course the exec function blocks until
    something.exe terminates. Just what I /don't/ want. (Wouldn't an & be
    nice here! Sigh)

    I need something.exe to disconnect and run in the background while I
    continue on with my script.

    Any help appreciated.
    Thanks,

    Alan Walkington
    United Defense
    San Jose, CA


  • Bent Stigsen

    #2
    Re: exec in background on Windows

    Alan Walkington wrote:
    [color=blue]
    > Folks:
    >
    > How can I get an /exec'ed/ process to run in the background on an XP box?
    >
    > I have a monitor-like process which I am starting as
    > 'exec("somethin g.exe");' and, of course the exec function blocks until
    > something.exe terminates. Just what I /don't/ want. (Wouldn't an & be
    > nice here! Sigh)
    >
    > I need something.exe to disconnect and run in the background while I
    > continue on with my script.[/color]

    you could install your program as a service, and then do a net start/stop.

    there was a service-wrapper for NT, but for XP??

    /Bent

    Comment

    • Alan Walkington

      #3
      Re: exec in background on Windows

      "Bent Stigsen" <.@thevoid.dk > wrote in message
      news:3eff074c$0 $13205$edfadb0f @dread15.news.t ele.dk...[color=blue]
      > Alan Walkington wrote:
      >[color=green]
      > > Folks:
      > >
      > > How can I get an /exec'ed/ process to run in the background on an XP[/color][/color]
      box?[color=blue][color=green]
      > >[/color][/color]
      <snip>
      [color=blue][color=green]
      > > I need something.exe to disconnect and run in the background while I
      > > continue on with my script.[/color]
      >
      > you could install your program as a service, and then do a net start/stop.
      >
      > there was a service-wrapper for NT, but for XP??
      >
      > /Bent[/color]
      I think that was a Java service wrapper, not PHP.
      Surely there is a way to start a process in Windows without having to
      babysit it!

      Alan


      Comment

      • Jason Dumler

        #4
        Re: exec in background on Windows

        Alan,

        You could also run a vb script file to do what you're looking for. You
        can have the script execute the file and not wait for the process to
        exit. Then the vb script exits, but your process keeps running.

        You could probably use the vb script to do some sort of service wrapper,
        or a service start/stop for you (if you install the program as a service).

        Jason.

        Bent Stigsen wrote:[color=blue]
        > Alan Walkington wrote:
        >
        >[color=green]
        >>Folks:
        >>
        >>How can I get an /exec'ed/ process to run in the background on an XP box?
        >>
        >>I have a monitor-like process which I am starting as
        >>'exec("someth ing.exe");' and, of course the exec function blocks until
        >>something.e xe terminates. Just what I /don't/ want. (Wouldn't an & be
        >>nice here! Sigh)
        >>
        >>I need something.exe to disconnect and run in the background while I
        >>continue on with my script.[/color]
        >
        >
        > you could install your program as a service, and then do a net start/stop.
        >
        > there was a service-wrapper for NT, but for XP??
        >
        > /Bent[/color]

        Comment

        • Derek O'Harrow

          #5
          Re: exec in background on Windows

          Have you tried exec'ing "start something.exe" ? That would start it as a
          seperate process.??

          "Alan Walkington" <alan[REMOVE]@walkington.net > wrote in message
          news:UfxLa.2951 546$CK1.442688@ news.easynews.c om...[color=blue]
          > Folks:
          >
          > How can I get an /exec'ed/ process to run in the background on an XP box?
          >
          > I have a monitor-like process which I am starting as
          > 'exec("somethin g.exe");' and, of course the exec function blocks until
          > something.exe terminates. Just what I /don't/ want. (Wouldn't an & be
          > nice here! Sigh)
          >
          > I need something.exe to disconnect and run in the background while I
          > continue on with my script.
          >
          > Any help appreciated.
          > Thanks,
          >
          > Alan Walkington
          > United Defense
          > San Jose, CA
          >
          >[/color]


          Comment

          Working...