Skip to content

sess_initialized is never reset #33

Closed

Description

@LeSpocky

While testing a fix for #25 I saw it does not solve the problem I actually try to solve. 😥

In a classic CGI the process is started, some things are done, the process ends, everything not released by yourself is cleaned up by the operating system. Now if you want to use libcgi together with FastCGI (this requires patches not in mainline yet) the process never ends, but the whole thing is enclosed by an endless loop. In this case the library MUST do proper bookkeeping and cleanup.

So when using libcgi in such a loop the first call to cgi_session_start() sets sess_initialized to true, every following call fails, because sess_initialized is never reset to false, which makes the whole session thing unusable.

There is a second variable sess_finitialized which is never tested and only set to false in cgi_session_destroy(). So even if this is meant to be the same as sess_initialized it would not work, because cgi_session_destroy() is not called every time. Actually most of the time you don't want to destroy your session, but keep it.

So there needs to be a way for resetting those flags and find a proper name for this function.

Activity

  1. added this to the milestone on Feb 16, 2017
  2. added a commit that references this issue on Feb 16, 2017
    b6fc028
  3. added 3 commits that reference this issue on Jul 12, 2018
    4d8a20b
    1aab22d
    5b37579
  4. added 2 commits that reference this issue on Jul 12, 2018
    d5eb42a
    a624152
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions