Documentation Source Text

Check-in [c84d76df63]
Login

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

Overview
Comment:In althttpd.c, make sure all file descriptors other than 0, 1, and 2 are closed prior to launching CGI.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: c84d76df63f4b07e8e0f05477f25df909488e270be512859dc666bcd5a9d48a0
User & Date: drh 2018-08-01 07:08:09.014
Context
2018-08-06
01:42
Fix typos in the windowfunction documentation. (check-in: ab3b52646c user: drh tags: trunk)
2018-08-01
07:08
In althttpd.c, make sure all file descriptors other than 0, 1, and 2 are closed prior to launching CGI. (check-in: c84d76df63 user: drh tags: trunk)
2018-07-27
23:56
Sublists in the change log are a-b-c instead of 1-2-3. (check-in: 3e5cf6efac user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to misc/althttpd.c.
1687
1688
1689
1690
1691
1692
1693

1694
1695
1696
1697
1698
1699
1700
        close(1);
        if( dup(px[1])!=1 ){
          Malfunction(450, /* LOG: dup(1) failed */
                 "Unable to duplicate file descriptor %d to 1",
                 px[1]);
        }
        close(px[1]);

        execl(zBaseFilename, zBaseFilename, (char*)0);
        exit(0);
      }
      close(px[1]);
      in = fdopen(px[0], "r");
    }
    if( in==0 ){







>







1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
        close(1);
        if( dup(px[1])!=1 ){
          Malfunction(450, /* LOG: dup(1) failed */
                 "Unable to duplicate file descriptor %d to 1",
                 px[1]);
        }
        close(px[1]);
        for(i=3; close(i)==0; i++){}
        execl(zBaseFilename, zBaseFilename, (char*)0);
        exit(0);
      }
      close(px[1]);
      in = fdopen(px[0], "r");
    }
    if( in==0 ){