I thought I would report this. I am churning through the ATCA GLASS data and have come across a little problematic scenario. If all data in a visibility file is already flagged before pgflag is executed, it seems that pgflag will hang. The process will run continue to run without and exit. My jobs on a compute cluster get timed out at 6 hours, and when I checked 5 hours were spent by this one pgflag task getting caught somewhere. In the last semester of observing where we were filling in missing hour-angle coverage I am finding this problem happening a more than I would like.
This happens in both the user interactive and automated flagging modes. It happens across different pgflag settings (stokes, flarpar etc).
I can work around this with a check using uvfstats to ensure that there is at least some unflagged data before hand. I would think though that the preferred behavior would be for pgflag to exit without getting caught in this loop.