mirror of
https://repo.or.cz/socat.git
synced 2025-07-13 23:13:24 +00:00
Fixed o-creat, o-excl, and o-cloexec with POSIXMQ-*
This commit is contained in:
parent
25d2f746d9
commit
1ea37d48c2
12 changed files with 83 additions and 68 deletions
15
xioopts.c
15
xioopts.c
|
@ -352,7 +352,7 @@ const struct optname optionnames[] = {
|
|||
#endif /* SO_CKSUMRECV */
|
||||
/*IF_NAMED ("cleanup", &opt_cleanup)*/
|
||||
IF_TERMIOS("clocal", &opt_clocal)
|
||||
IF_ANY ("cloexec", &opt_cloexec)
|
||||
IF_ANY ("cloexec", &opt_cloexec)
|
||||
IF_ANY ("close", &opt_end_close)
|
||||
IF_OPENSSL("cn", &opt_openssl_commonname)
|
||||
IF_OPENSSL("commonname", &opt_openssl_commonname)
|
||||
|
@ -390,8 +390,8 @@ const struct optname optionnames[] = {
|
|||
# endif
|
||||
#endif /* defined(CRDLY) */
|
||||
IF_TERMIOS("cread", &opt_cread)
|
||||
IF_OPEN ("creat", &opt_o_create)
|
||||
IF_OPEN ("create", &opt_o_create)
|
||||
IF_OPEN ("creat", &opt_o_creat)
|
||||
IF_OPEN ("create", &opt_o_creat)
|
||||
IF_ANY ("crlf", &opt_crnl)
|
||||
IF_ANY ("crnl", &opt_crnl)
|
||||
IF_TERMIOS("crterase", &opt_echoe)
|
||||
|
@ -1135,8 +1135,8 @@ const struct optname optionnames[] = {
|
|||
#ifdef O_BINARY
|
||||
IF_OPEN ("o-binary", &opt_o_binary)
|
||||
#endif
|
||||
IF_OPEN ("o-creat", &opt_o_create)
|
||||
IF_OPEN ("o-create", &opt_o_create)
|
||||
IF_OPEN ("o-creat", &opt_o_creat)
|
||||
IF_OPEN ("o-create", &opt_o_creat)
|
||||
#ifdef O_DEFER
|
||||
IF_OPEN ("o-defer", &opt_o_defer)
|
||||
#endif
|
||||
|
@ -1194,7 +1194,8 @@ const struct optname optionnames[] = {
|
|||
#endif
|
||||
IF_OPEN ("o-trunc", &opt_o_trunc)
|
||||
IF_OPEN ("o-wronly", &opt_o_wronly)
|
||||
IF_OPEN ("o_create", &opt_o_create)
|
||||
IF_OPEN ("o_creat", &opt_o_creat)
|
||||
IF_OPEN ("o_create", &opt_o_creat)
|
||||
#ifdef O_DEFER
|
||||
IF_OPEN ("o_defer", &opt_o_defer)
|
||||
#endif
|
||||
|
@ -4230,7 +4231,7 @@ int applyopts_cloexec(int fd, struct opt *opts) {
|
|||
|
||||
if (!opts) return 0;
|
||||
|
||||
retropt_bool(opts, OPT_CLOEXEC, &docloexec);
|
||||
retropt_bool(opts, OPT_O_CLOEXEC, &docloexec);
|
||||
if (docloexec) {
|
||||
if (Fcntl_l(fd, F_SETFD, FD_CLOEXEC) < 0) {
|
||||
Warn2("fcntl(%d, F_SETFD, FD_CLOEXEC): %s", fd, strerror(errno));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue