pm2: ported from LEO kernel