• # L'impossible à la lumière crue du jour

    Posté par (site web personnel) . En réponse au journal Machine arrière toute, cap au 2.4.20 !. Évalué à 1.

    Quand même, c'est pas banal, donc en dehors de toute romanisation...

    Le script hotplug contient ça (entre plein d'autres) :

    MAX_LOCK_AGE=60
    log "currenttime: $currenttime" # récupéré à partir de 'date'
    log "timestamp: $timestamp" # récupéré dans le fichier lock
    if expr $currenttime '-' $timestamp '<' $MAX_LOCK_AGE; then
    log "Found a recent lock, exiting"
    exit 0
    else
    log "Found a stale lock"
    fi
    # Et on vire l'ancien lock, on créé le nouveau, etc.

    Le log contient ça (entre plein plein d'autres) :

    2003年06月20日 13:06:02 starter-463: Trying to acquire the lock
    2003年06月20日 13:06:02 starter-463: Creating lockfile
    2003年06月20日 13:06:03 starter-496: Trying to acquire the lock
    2003年06月20日 13:06:03 starter-496: currenttime: 1056107163
    2003年06月20日 13:06:03 starter-496: timestamp: 1056107162
    2003年06月20日 13:06:03 starter-496: Found a stale lock

    C'est quand même fou. Quand deux starters sont lancés à plusieurs secondes d'écart (sous 2.4.20), il n'y a pas ce problème :

    2003年06月20日 10:29:46 starter-421: Trying to acquire the lock
    2003年06月20日 10:29:46 starter-421: Creating lockfile
    2003年06月20日 10:29:52 starter-489: Trying to acquire the lock
    2003年06月20日 13:06:03 starter-496: currenttime: 1056097792
    2003年06月20日 13:06:03 starter-496: timestamp: 1056097786
    2003年06月20日 10:29:52 starter-489: Found a recent lock, exiting