Browse Source

open serial ports with O_NOCTTY

master
Olaf Rempel 9 years ago
parent
commit
1189b08b54
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      lcd.c
  2. +1
    -1
      pic.c

+ 1
- 1
lcd.c View File

@ -130,7 +130,7 @@ void lcd_close(struct lcddev *dev)
static int lcd_open(struct lcddev *dev, const char *device)
{
dev->fd = open(device, O_RDWR);
dev->fd = open(device, O_RDWR | O_NOCTTY | O_CLOEXEC);
if (dev->fd < 0) {
log_print(LOG_ERROR, "%s(): failed to open '%s'", __FUNCTION__, device);
return -1;


+ 1
- 1
pic.c View File

@ -98,7 +98,7 @@ static int pic_close(struct picdev *dev)
static int pic_open(struct picdev *dev, const char *device)
{
dev->fd = open(device, O_RDWR);
dev->fd = open(device, O_RDWR | O_NOCTTY | O_CLOEXEC);
if (dev->fd < 0) {
log_print(LOG_ERROR, "%s(): failed to open '%s'", __FUNCTION__, device);
return -1;


Loading…
Cancel
Save