Jim Tcl
Check-in [0f89f3d934]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:aio: Don't use FD_CLOEXEC with JIM_ANSIC

Bootstrap jimsh sets JIM_ANSIC but FD_CLOEXEC is enabled. This causes FD_CLOEXEC to be set on fd 0 (stdin), thus closing the default fd 0 in the child process during exec.

Signed-off-by: Steve Bennett <steveb@workware.net.au>

Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 0f89f3d9343f9e996137dd86980e9286db654b25
User & Date: steveb@workware.net.au 2018-11-23 12:20:56
Context
2018-11-24
01:24
aio: Prefer TLS_method() over TLSv1_2_method()

To avoid a deprecation warning

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 1952b26edf user: steveb@workware.net.au tags: trunk

2018-11-23
12:20
aio: Don't use FD_CLOEXEC with JIM_ANSIC

Bootstrap jimsh sets JIM_ANSIC but FD_CLOEXEC is enabled. This causes FD_CLOEXEC to be set on fd 0 (stdin), thus closing the default fd 0 in the child process during exec.

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 0f89f3d934 user: steveb@workware.net.au tags: trunk

2018-10-26
05:32
appveyor.yml: fix missing zlib1.dll in jimsh.zip check-in: aceabc1d7d user: steveb@workware.net.au tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to jim-aio.c.

1708
1709
1710
1711
1712
1713
1714


1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
        }
    }

    /* Create the file command */
    af = Jim_Alloc(sizeof(*af));
    memset(af, 0, sizeof(*af));
    af->fp = fh;


#ifndef JIM_ANSIC
    af->fd = fileno(fh);
#endif
    af->filename = filename;
#ifdef FD_CLOEXEC
    if ((openFlags & AIO_KEEPOPEN) == 0) {
        (void)fcntl(af->fd, F_SETFD, FD_CLOEXEC);
    }
#endif
    af->openFlags = openFlags;
    af->addr_family = family;
    af->fops = &stdio_fops;
    af->ssl = NULL;

    Jim_CreateCommand(interp, buf, JimAioSubCmdProc, af, JimAioDelProc);

    /* Note that the command must use the global namespace, even if







>
>


<
<





|







1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718


1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
        }
    }

    /* Create the file command */
    af = Jim_Alloc(sizeof(*af));
    memset(af, 0, sizeof(*af));
    af->fp = fh;
    af->filename = filename;
    af->openFlags = openFlags;
#ifndef JIM_ANSIC
    af->fd = fileno(fh);


#ifdef FD_CLOEXEC
    if ((openFlags & AIO_KEEPOPEN) == 0) {
        (void)fcntl(af->fd, F_SETFD, FD_CLOEXEC);
    }
#endif
#endif
    af->addr_family = family;
    af->fops = &stdio_fops;
    af->ssl = NULL;

    Jim_CreateCommand(interp, buf, JimAioSubCmdProc, af, JimAioDelProc);

    /* Note that the command must use the global namespace, even if