Merge branch 'deif/O_CLOEXEC' into 'master'
lib: use O_CLOEXEC flag when opening EtherCAT master device See merge request etherlab.org/ethercat!56
This commit is contained in:
commit
e893051563
|
|
@ -97,9 +97,9 @@ ec_master_t *ecrt_open_master(unsigned int master_index)
|
|||
master_index);
|
||||
|
||||
#ifdef USE_RTDM
|
||||
master->fd = rt_dev_open(path, O_RDWR);
|
||||
master->fd = rt_dev_open(path, O_RDWR | O_CLOEXEC);
|
||||
#else
|
||||
master->fd = open(path, O_RDWR);
|
||||
master->fd = open(path, O_RDWR | O_CLOEXEC);
|
||||
#endif
|
||||
if (EC_IOCTL_IS_ERROR(master->fd)) {
|
||||
EC_PRINT_ERR("Failed to open %s: %s\n", path,
|
||||
|
|
|
|||
Loading…
Reference in New Issue