diff options
author | Daniel Wagner <daniel.wagner@bmw-carit.de> | 2011-10-23 14:16:23 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2011-10-25 13:34:06 +0200 |
commit | 4826f90b555f009972276be1fa945d81b435950a (patch) | |
tree | 2d62eda201ef154be4aeb869978685e9d99f1a24 /tools/wispr.c | |
parent | cb3e78500a2539a61d73ecb9708a2b06ea1f356d (diff) | |
download | connman-4826f90b555f009972276be1fa945d81b435950a.tar.gz connman-4826f90b555f009972276be1fa945d81b435950a.tar.bz2 connman-4826f90b555f009972276be1fa945d81b435950a.zip |
tools: Add O_CLOEXEC to open()
Make sure all file descriptor are closed.
Diffstat (limited to 'tools/wispr.c')
-rw-r--r-- | tools/wispr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/wispr.c b/tools/wispr.c index 0792f5b1..1300e40d 100644 --- a/tools/wispr.c +++ b/tools/wispr.c @@ -373,7 +373,7 @@ static gboolean user_input(const char *label, gboolean hidden, data->user_data = user_data; data->hidden = hidden; - data->fd = open("/dev/tty", O_RDWR | O_NOCTTY); + data->fd = open("/dev/tty", O_RDWR | O_NOCTTY | O_CLOEXEC); if (data->fd < 0) goto error; |