X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/9a41f8d3877bc717e3eec330637122c390dc4240..f5c578b08c147e3a0c9a67c75ed57a7ddb7e20dd:/unix/uxser.c diff --git a/unix/uxser.c b/unix/uxser.c index d6471084..24b0124c 100644 --- a/unix/uxser.c +++ b/unix/uxser.c @@ -214,7 +214,16 @@ static const char *serial_configure(Serial serial, Config *cfg) #ifdef ONLCR | ONLCR #endif - | OCRNL | ONOCR | ONLRET); +#ifdef OCRNL + | OCRNL +#endif +#ifdef ONOCR + | ONOCR +#endif +#ifdef ONLRET + | ONLRET +#endif + ); options.c_cc[VMIN] = 1; options.c_cc[VTIME] = 0; @@ -257,6 +266,8 @@ static const char *serial_init(void *frontend_handle, void **backend_handle, if (serial->fd < 0) return "Unable to open serial port"; + cloexec(serial->fd); + err = serial_configure(serial, cfg); if (err) return err;