[ProgClub programming] top: st : time stolen from this vm by the hypervisor
John Elliot V | ProgClub
jj5 at progclub.org
Thu Jun 6 12:53:29 AEST 2019
I have applied your patch:
On 6/6/19 12:42 pm, Roland Turner via programming wrote:
> That said, if your maintenance automation scripts aren't using -e, then
> this may help explain your reliability anxiety.
Oh. Before I knew of -e (which I enable by default:
now that I know about it, although I do find myself removing it from
time to time), I created run():
to check the output and fail on non-zero return. So in my scripts if I
want to automatically bail on error I just prefix my commands with
quiet pushd /tmp
run mkdir whatever
run rmdir whatever
Note: quiet() is like run(), in that it handles errors, but it
suppresses output on stdout and doesn't report the job its running.
There's silent() too, which is like quiet(), but which suppresses output
on stdout and stderr.
> This would be obviated if bash could be persuaded to take an exclusive
> lock on a file, which means that no cleanup would be required: the lock
> would open automatically when the process terminated. I don't know of
> any way to get bash to do this.
$ man flock .. ?
May the Force be with you,
John Elliot V
|_|_|O| Because every programmer needs a good club!
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 231 bytes
Desc: not available
More information about the programming