| 898 | } |
| 899 | |
| 900 | long SysGrantPTY(regs64_t* r){ |
| 901 | if(!SC_ARG0(r)) return 1; |
| 902 | |
| 903 | PTY* pty = GrantPTY(Scheduler::GetCurrentProcess()->pid); |
| 904 | |
| 905 | process_t* currentProcess = Scheduler::GetCurrentProcess(); |
| 906 | |
| 907 | *((int*)SC_ARG0(r)) = currentProcess->fileDescriptors.get_length(); |
| 908 | |
| 909 | currentProcess->fileDescriptors[0] = fs::Open(&pty->slaveFile); // Stdin |
| 910 | currentProcess->fileDescriptors[1] = fs::Open(&pty->slaveFile); // Stdout |
| 911 | currentProcess->fileDescriptors[2] = fs::Open(&pty->slaveFile); // Stderr |
| 912 | |
| 913 | currentProcess->fileDescriptors.add_back(fs::Open(&pty->masterFile)); |
| 914 | |
| 915 | return 0; |
| 916 | } |
| 917 | |
| 918 | long SysGetCWD(regs64_t* r){ |
| 919 | char* buf = (char*)SC_ARG0(r); |
nothing calls this directly
no test coverage detected