Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: Perl/CGI deamon

  1. #1
    New to the CF scene
    Join Date
    May 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Perl/CGI deamon

    Hi everybody, i'm new here.

    I've got one question: how i can run the daemon process during the user is on website? When he load page: start process and when he leave page: stop process.

    It's possible?
    Last edited by develulter; 05-28-2011 at 11:48 AM.

  • #2
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by develulter View Post
    Hi everybody, i'm new here.

    I've got one question: how i can run the daemon process during the user is on website? When he load page: start process and when he leave page: stop process.

    It's possible?
    probably yes but is hard to give a definitive answer,
    what make this hard is that http is stateless, you could find when somebody ask for a page but is hard to say when he/she leave the page.
    i didn't investigate the problem but probably you could start search from here:

    http://www.perlmonks.org/?node_id=588964

    best regards

  • #3
    New to the CF scene
    Join Date
    May 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yes, when he load page i can run perl script like javascript source - it's not a problem - it's works fine. But "onunload" (and similar) event is not support in all browser (i.e. Opera), so i can't check, when user close the page/browser.

    Thanks for link!

    Ps. I wonder, if HTTP :: Daemon can help me in this situation?

  • #4
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by develulter View Post
    Yes, when he load page i can run perl script like javascript source - it's not a problem - it's works fine. But "onunload" (and similar) event is not support in all browser (i.e. Opera), so i can't check, when user close the page/browser.
    check on a regular basis if user agent store a given cookie? probably when you discover that is not stored is already too late.

    Thanks for link!

    Ps. I wonder, if HTTP :: Daemon can help me in this situation?
    yes, probably. I don't have a clear idea about what should be done and how.

    best regards


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •