Closed Bug 650828 Opened 9 years ago Closed 9 years ago
change runtestremote and remotereftests to generate pid file
If we can enable runtestsremote and remotereftests to generate a pid file for themselves, and optionally for their children, then the device prep build step can check to see if older processes are hanging around and kill them.
My preference would be to add a parameter to allow the caller to specify the location and name of the pid file - this would let the build step code put it in the same area as the rest of the pid files we generate. The the default could be the directory where the process is started for non releng environments
this patch adds --pidfile to the cli. Given a filename, this will print the pid to the given filename and will remove the file in the final cleanup step in the harness.
Comment on attachment 526894 [details] [diff] [review] add --pidfile to the cli which will create a pidfile while the harness is running (1.0) looks good. This may be a nit, but I like to wrap the os.remove() with an except catch for OSError so you catch the odd moment when the pidfile goes away during the codes runtime.
Attachment #526894 - Flags: feedback?(bear) → feedback+
updated with warning statement if os.remove() fails!
Comment on attachment 526900 [details] [diff] [review] add --pidfile to the cli which will create a pidfile while the harness is running (1.1) Looks good
Attachment #526900 - Flags: review?(ctalbert) → review+
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.