Menu

#80 papco_process_active unreliable

open
nobody
None
5
2013-01-04
2009-03-15
No

papco_process_active is unreliable because it's difficult to get the PID of the subprocess. For example, papco_wget has about 20 lines of code to establish the pid based on os, and this code is contently breaking. This causes wget to fail because it doesn't block until the download is really done.

Discussion

  • Jeremy Faden

    Jeremy Faden - 2009-03-15

    We introduce papco_spawn_background, which writes a script to wrap the background spawned command and then remove a flag file. papco_process_active can then work by checking to see if the file still exists. This also introduces "papco process id's" which are PIDs much higher than the OS pids, and these refer to the flag file. PAPCO_USER/proc is where these files are found.

     
  • Jeremy Faden

    Jeremy Faden - 2009-03-15

    This is implemented on unix-based systems.