MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / GrantPTY

Function GrantPTY

Kernel/src/tty/pty.cpp:37–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35List<PTY*>* ptys = NULL;
36
37PTY* GrantPTY(uint64_t pid){
38 if(!ptys) ptys = new List<PTY*>();
39
40 char name[5] = {'p', 't', 'y', 0, 0};
41 name[4] = nextPTY;
42 GetNextPTY();
43
44 PTY* pty = new PTY(name);
45
46 return pty;
47}
48
49PTYDevice::PTYDevice(const char* name) : Device(name, TypePseudoterminalDevice){
50 dirent.node = this;

Callers 1

SysGrantPTYFunction · 0.85

Calls 1

GetNextPTYFunction · 0.85

Tested by

no test coverage detected