{
    "mode": "perldoc",
    "parameter": "Net::Server::Fork",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Net%3A%3AServer%3A%3AFork/json",
    "generated": "2026-06-09T18:47:35Z",
    "synopsis": "use base qw(Net::Server::Fork);\nsub processrequest {\n#...code...\n}\nPACKAGE->run();",
    "sections": {
        "NAME": {
            "content": "Net::Server::Fork - Net::Server personality\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use base qw(Net::Server::Fork);\n\nsub processrequest {\n#...code...\n}\n\nPACKAGE->run();\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Please read the pod on Net::Server first. This module is a personality, or extension, or sub\nclass, of the Net::Server module.\n\nThis personality binds to one or more ports and then waits for a client connection. When a\nconnection is received, the server forks a child. The child handles the request and then closes.\n\nWith the exception of parent/child signaling, this module will work (with basic functionality)\non Win32 systems.\n",
            "subsections": []
        },
        "ARGUMENTS": {
            "content": "checkfordead\nNumber of seconds to wait before looking for dead children. This only takes place if the\nmaximum number of child processes (maxservers) has been reached. Default is 60 seconds.\n\nmaxservers\nThe maximum number of children to fork. The server will not accept connections until there\nare free children. Default is 256 children.\n\nmaxdequeue\nThe maximum number of dequeue processes to start. If a value of zero or undef is given, no\ndequeue processes will be started. The number of running dequeue processes will be checked\nby the checkfordead variable.\n\ncheckfordequeue\nSeconds to wait before forking off a dequeue process. It is intended to use the dequeue\nprocess to take care of items such as mail queues. If a value of undef is given, no dequeue\nprocesses will be started.\n",
            "subsections": []
        },
        "CONFIGURATION FILE": {
            "content": "See Net::Server.\n",
            "subsections": []
        },
        "PROCESS FLOW": {
            "content": "Process flow follows Net::Server until the postaccept phase. At this point a child is forked.\nThe parent is immediately able to wait for another request. The child handles the request and\nthen exits.\n",
            "subsections": []
        },
        "HOOKS": {
            "content": "The Fork server has the following hooks in addition to the hooks provided by the Net::Server\nbase class. See Net::Server\n\n\"$self->preaccepthook()\"\nThis hook occurs just before the accept is called.\n\n\"$self->postaccepthook()\"\nThis hook occurs in the child after the accept and fork.\n\n\"$self->rundequeue()\"\nThis hook only gets called in conjunction with the checkfordequeue setting.\n",
            "subsections": []
        },
        "HOT DEPLOY": {
            "content": "Since version 2.000, the Fork server has accepted the TTIN and TTOU signals. When a TTIN is\nreceived, the maxservers is increased by 1. If a TTOU signal is received the maxservers is\ndecreased by 1. This allows for adjusting the number of handling processes without having to\nrestart the server.\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Paul Seamons <paul@seamons.com>\n\nRob Brown <bbb@cpan.org>\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "Please see also Net::Server::INET, Net::Server::PreFork, Net::Server::MultiType,\nNet::Server::SIG Net::Server::Single\n",
            "subsections": []
        }
    },
    "summary": "Net::Server::Fork - Net::Server personality",
    "flags": [],
    "examples": [],
    "see_also": []
}