mailarchive of the pengutronix oss-tools mailing list
 help / color / mirror / Atom feed
* [OSS-Tools] [PATCH 1/2] serial: open port with O_NONBLOCK
@ 2018-03-06  9:44 Uwe Kleine-König
  2018-03-06  9:44 ` [OSS-Tools] [PATCH 2/2] Advertise oss-tools@pengutronix.de as address to send patches to Uwe Kleine-König
  2018-03-06 10:06 ` [OSS-Tools] [PATCH 1/2] serial: open port with O_NONBLOCK Uwe Kleine-König
  0 siblings, 2 replies; 3+ messages in thread
From: Uwe Kleine-König @ 2018-03-06  9:44 UTC (permalink / raw)
  To: oss-tools

I don't know when this is necessary, but sometimes the pl2303 on an
espressobin board blocks on open() otherwise. kermit uses O_NONBLOCK,
too.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 serial.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/serial.c b/serial.c
index 00b817d9c94f..0778fe1d8698 100644
--- a/serial.c
+++ b/serial.c
@@ -203,7 +203,7 @@ struct ios_ops * serial_init(char *device)
 	close(fd);
 force:
 	/* open the device */
-	fd = open(device, O_RDWR);
+	fd = open(device, O_RDWR | O_NONBLOCK);
 	ops->fd = fd;
 
 	if (fd < 0) {
-- 
2.16.1

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-03-06 10:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-06  9:44 [OSS-Tools] [PATCH 1/2] serial: open port with O_NONBLOCK Uwe Kleine-König
2018-03-06  9:44 ` [OSS-Tools] [PATCH 2/2] Advertise oss-tools@pengutronix.de as address to send patches to Uwe Kleine-König
2018-03-06 10:06 ` [OSS-Tools] [PATCH 1/2] serial: open port with O_NONBLOCK Uwe Kleine-König

mailarchive of the pengutronix oss-tools mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://lore.pengutronix.de/oss-tools/0 oss-tools/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 oss-tools oss-tools/ https://lore.pengutronix.de/oss-tools \
		oss-tools@pengutronix.de
	public-inbox-index oss-tools

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git