Skip to content

Commit

Permalink
TTYServer: Use pledge()
Browse files Browse the repository at this point in the history
  • Loading branch information
awesomekling committed Jan 11, 2020
1 parent 7b6b1ba commit 5f5791c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Servers/TTYServer/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@

int main(int argc, char** argv)
{
if (pledge("stdio tty proc exec", nullptr) < 0) {
perror("pledge");
return 1;
}

if (argc < 2)
return -1;

Expand Down

0 comments on commit 5f5791c

Please sign in to comment.