Skip to content

Commit

Permalink
Update comments about old O_NDELAY
Browse files Browse the repository at this point in the history
  • Loading branch information
stephane committed Oct 22, 2024
1 parent de0999f commit bb13443
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/modbus-rtu.c
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ static int _modbus_rtu_connect(modbus_t *ctx)
signals and so forth) will affect your process
Timeouts are ignored in canonical input mode or when the
NDELAY option is set on the file via open or fcntl */
NONBLOCK option is set on the file via open or fcntl */
flags = O_RDWR | O_NOCTTY | O_NONBLOCK | O_EXCL;
#ifdef O_CLOEXEC
flags |= O_CLOEXEC;
Expand Down Expand Up @@ -816,7 +816,7 @@ static int _modbus_rtu_connect(modbus_t *ctx)
UNIX serial interface drivers provide the ability to
specify character and packet timeouts. Two elements of the
c_cc array are used for timeouts: VMIN and VTIME. Timeouts
are ignored in canonical input mode or when the NDELAY
are ignored in canonical input mode or when the NONBLOCK
option is set on the file via open or fcntl.
VMIN specifies the minimum number of characters to read. If
Expand Down Expand Up @@ -846,9 +846,9 @@ static int _modbus_rtu_connect(modbus_t *ctx)
VTIME specifies the amount of time to wait for incoming
characters in tenths of seconds. If VTIME is set to 0 (the
default), reads will block (wait) indefinitely unless the
NDELAY option is set on the port with open or fcntl.
NONBLOCK option is set on the port with open or fcntl.
*/
/* Unused because we use open with the NDELAY option */
/* Unused because we use open with the NONBLOCK option */
tios.c_cc[VMIN] = 0;
tios.c_cc[VTIME] = 0;

Expand Down

0 comments on commit bb13443

Please sign in to comment.