[plug] Logrotate Killing Apache

Cameron Patrick cameron at patrick.wattle.id.au
Mon Oct 24 11:53:57 WST 2005


Bernard Blackham wrote:

> Yep. Ideally there'd be some way to close all FDs, but I don't know
> one yet and haven't looked hard.

Can you be evil with /proc/self/fd?  e.g.

for x in /proc/self/fd/*; do
    if [  "$(basename $x)" -gt 2 ]; then
        eval "exec $x>&-"
    fi
done

Cameron



More information about the plug mailing list