grantpt
extern int grantpt(int masterFD);
if (grantpt(master) != 0 || unlockpt(master) != 0
if (grantpt(master) != 0 || unlockpt(master) != 0
if (grantpt(p) == -1)
if (grantpt(master) != 0 || unlockpt(master) != 0
if (grantpt(ptm) == -1) {