{
    "content": [
        {
            "type": "text",
            "text": "# setlock (man)\n\n## NAME\n\nsetlock - runs another program with a file locked.\n\n## SYNOPSIS\n\nsetlock [ -nNxX ] fn child\n\n## DESCRIPTION\n\nfn is a single argument.  child consists of one or more arguments.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (4 subsections)\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "setlock",
        "section": "",
        "mode": "man",
        "summary": "setlock - runs another program with a file locked.",
        "synopsis": "setlock [ -nNxX ] fn child",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [
            {
                "flag": "-n",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-N",
                "long": null,
                "arg": null,
                "description": "tain a new lock."
            },
            {
                "flag": "-x",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-X",
                "long": null,
                "arg": null,
                "description": "sage and exits nonzero."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "supervise",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/supervise/8/json"
            },
            {
                "name": "svc",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/svc/8/json"
            },
            {
                "name": "svok",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/svok/8/json"
            },
            {
                "name": "svstat",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/svstat/8/json"
            },
            {
                "name": "svscanboot",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/svscanboot/8/json"
            },
            {
                "name": "svscan",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/svscan/8/json"
            },
            {
                "name": "readproctitle",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/readproctitle/8/json"
            },
            {
                "name": "fghack",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/fghack/8/json"
            },
            {
                "name": "pgrphack",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/pgrphack/8/json"
            },
            {
                "name": "multilog",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/multilog/8/json"
            },
            {
                "name": "tai64n",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/tai64n/8/json"
            },
            {
                "name": "tai64nlocal",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/tai64nlocal/8/json"
            },
            {
                "name": "setuidgid",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/setuidgid/8/json"
            },
            {
                "name": "envuidgid",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/envuidgid/8/json"
            },
            {
                "name": "envdir",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/envdir/8/json"
            },
            {
                "name": "softlimit",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/softlimit/8/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 14,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-n",
                        "lines": 1,
                        "flag": "-n"
                    },
                    {
                        "name": "-N",
                        "lines": 2,
                        "flag": "-N"
                    },
                    {
                        "name": "-x",
                        "lines": 1,
                        "flag": "-x"
                    },
                    {
                        "name": "-X",
                        "lines": 2,
                        "flag": "-X"
                    }
                ]
            },
            {
                "name": "SEE ALSO",
                "lines": 7,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "setlock - runs another program with a file locked.\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "setlock [ -nNxX ] fn child\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "fn is a single argument.  child consists of one or more arguments.\n\nsetlock opens fn for writing (creating it if it does not exist), obtains an exclusive lock on\nit, and runs child.\n\nNormally the lock disappears when child exits.\n\nHere's  the  complete  story:  child is given a descriptor for a locked ofile pointing to the\ndisk file named fn.  The lock disappears when this ofile is\n\no      closed by all the processes that have descriptors for it or\n\no      explicitly unlocked.\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "",
                "subsections": [
                    {
                        "name": "-n",
                        "content": "",
                        "flag": "-n"
                    },
                    {
                        "name": "-N",
                        "content": "tain a new lock.\n",
                        "flag": "-N"
                    },
                    {
                        "name": "-x",
                        "content": "",
                        "flag": "-x"
                    },
                    {
                        "name": "-X",
                        "content": "sage and exits nonzero.\n",
                        "flag": "-X"
                    }
                ]
            },
            "SEE ALSO": {
                "content": "supervise(8),   svc(8),   svok(8),  svstat(8),  svscanboot(8),  svscan(8),  readproctitle(8),\nfghack(8), pgrphack(8), multilog(8), tai64n(8), tai64nlocal(8),  setuidgid(8),  envuidgid(8),\nenvdir(8), softlimit(8)\n\nhttp://cr.yp.to/daemontools.html\n\nsetlock(8)",
                "subsections": []
            }
        }
    }
}