mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-06-30 19:12:48 -05:00
Set FD_CLOEXEC in a little convenience function that does the right thing
with F_GETFD and F_SETFD. [originally from svn r6978]
This commit is contained in:
@ -257,7 +257,7 @@ static const char *serial_init(void *frontend_handle, void **backend_handle,
|
||||
if (serial->fd < 0)
|
||||
return "Unable to open serial port";
|
||||
|
||||
fcntl(serial->fd, F_SETFD, FD_CLOEXEC);
|
||||
cloexec(serial->fd);
|
||||
|
||||
err = serial_configure(serial, cfg);
|
||||
if (err)
|
||||
|
Reference in New Issue
Block a user