Plan 9 from Bell Labs’s /usr/web/sources/contrib/quanstro/src/9term-nocolor/Linux.c

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#define getpts not_using_this_getpts
#include "bsdpty.c"
#undef getpts

int
getpts(int fd[], char *slave)
{
	if(openpty(&fd[1], &fd[0], NULL, NULL, NULL) >= 0){
		fchmod(fd[1], 0620);
		strcpy(slave, ttyname(fd[0]));
		return 0;
	}
	sysfatal("no ptys");
	return 0;
}

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].