… | |
… | |
3573 | }; |
3573 | }; |
3574 | } |
3574 | } |
3575 | } |
3575 | } |
3576 | |
3576 | |
3577 | sub write_runtime_sync { |
3577 | sub write_runtime_sync { |
|
|
3578 | my $t0 = EV::time; |
|
|
3579 | |
3578 | # first touch the runtime file to show we are still running: |
3580 | # first touch the runtime file to show we are still running: |
3579 | # the fsync below can take a very very long time. |
3581 | # the fsync below can take a very very long time. |
3580 | |
3582 | |
3581 | IO::AIO::aio_utime $RUNTIMEFILE, undef, undef; |
3583 | IO::AIO::aio_utime $RUNTIMEFILE, undef, undef; |
3582 | |
3584 | |
… | |
… | |
3603 | or return; |
3605 | or return; |
3604 | |
3606 | |
3605 | aio_rename "$RUNTIMEFILE~", $RUNTIMEFILE |
3607 | aio_rename "$RUNTIMEFILE~", $RUNTIMEFILE |
3606 | and return; |
3608 | and return; |
3607 | |
3609 | |
3608 | warn "runtime file written.\n"; |
3610 | warn sprintf "runtime file written (%gs).\n", EV::time - $t0; |
3609 | |
3611 | |
3610 | 1 |
3612 | 1 |
3611 | } |
3613 | } |
3612 | |
3614 | |
3613 | our $uuid_lock; |
3615 | our $uuid_lock; |