Skip to content

Commit

Permalink
supply O_NOCTTY to open(2) in get_fd_tty()
Browse files Browse the repository at this point in the history
  • Loading branch information
dankamongmen committed Jun 22, 2021
1 parent f2c8cd3 commit 8022faf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/fd.c
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ int get_tty_fd(FILE* ttyfp){
}
}
if(fd < 0){
fd = open("/dev/tty", O_RDWR | O_CLOEXEC);
fd = open("/dev/tty", O_RDWR | O_CLOEXEC | O_NOCTTY);
if(fd < 0){
loginfo("Error opening /dev/tty (%s)\n", strerror(errno));
}else{
Expand Down

0 comments on commit 8022faf

Please sign in to comment.