expose pid to frontend