get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/137293/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 137293,
    "url": "http://patches.dpdk.org/api/patches/137293/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20240226205143.66702-2-stephen@networkplumber.org/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20240226205143.66702-2-stephen@networkplumber.org>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240226205143.66702-2-stephen@networkplumber.org",
    "date": "2024-02-26T20:49:48",
    "name": "[1/2] app/dumpcap: handle SIGTERM and SIGHUP",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "e5b559895ee4ac112c3f3e76c95193d6cdcc3994",
    "submitter": {
        "id": 27,
        "url": "http://patches.dpdk.org/api/people/27/?format=api",
        "name": "Stephen Hemminger",
        "email": "stephen@networkplumber.org"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20240226205143.66702-2-stephen@networkplumber.org/mbox/",
    "series": [
        {
            "id": 31231,
            "url": "http://patches.dpdk.org/api/series/31231/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=31231",
            "date": "2024-02-26T20:49:47",
            "name": "dumpcap,pdump handle cleanup signals",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/31231/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/137293/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/137293/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id AC25343BF6;\n\tMon, 26 Feb 2024 21:52:00 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 5FBA342E57;\n\tMon, 26 Feb 2024 21:51:56 +0100 (CET)",
            "from mail-pl1-f170.google.com (mail-pl1-f170.google.com\n [209.85.214.170])\n by mails.dpdk.org (Postfix) with ESMTP id 7409A402CC\n for <dev@dpdk.org>; Mon, 26 Feb 2024 21:51:54 +0100 (CET)",
            "by mail-pl1-f170.google.com with SMTP id\n d9443c01a7336-1dc0d11d1b7so27710745ad.2\n for <dev@dpdk.org>; Mon, 26 Feb 2024 12:51:54 -0800 (PST)",
            "from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141])\n by smtp.gmail.com with ESMTPSA id\n 5-20020a170902ee4500b001db3efca159sm109615plo.132.2024.02.26.12.51.53\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Mon, 26 Feb 2024 12:51:53 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1708980713;\n x=1709585513; darn=dpdk.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=YCdLEaG5eE8vaeu+2OxtfS28AWX0rOgbRs8sMhWeP5k=;\n b=h9LM5TLN95z7fLWk2ztun8qRHLBfHhvhdR2xUv+lxhP0HwDbwWgO1seCdufg8V9CxA\n BK0qz/l1m110mgsWdo9MgVtU9FsJotp9ENDV1MhvbSoqEyH8oVuPT5MGg4UIGow7EudV\n ElSFLkxauGzfz9/oY7pTPsVaUkA4bWQeRlS2GBVeve+I+x7A6xN0i7ycHImytrRPO9GT\n MGx9aE5a33bd2RJe0fkaSEsUg+INLvQknmIt0XJsZ0v43Ma02sSVvEFMCtXJ5POXlMU8\n j79r/RuysxX8DxawRkKG4Ra/15DhuXkbn02712il85atapOi41tqlnwO/efDq3czjEL3\n eAUw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1708980713; x=1709585513;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n :subject:date:message-id:reply-to;\n bh=YCdLEaG5eE8vaeu+2OxtfS28AWX0rOgbRs8sMhWeP5k=;\n b=IhD51KrEZwZzsaJjZqzc0wE8caodshzulDEx34RMCrsEacT0hYOsmwhALvtWr2C+vk\n 4sdoCDux83hLnXLhphrekYnQuP4cblj6j/zyqgh1BwBGsRq/SRNNQY7a6Y8FWmsHJQHe\n DzeDqDHzjbZ2WYwUcyAyL7iwtRq0HMOFfZDrx4MB0FfNHdTAjXRHcbCewr/MaK0QNlHg\n y7EoKAqqpvmWZFG0pFCDkBJpA2yQdl2guJ6hfDe3Kc9OURXhbl3W1QjyOMrSGcI6zxDk\n bq+r6U6C/BlA9TSJ1NIXR6zOxaudSA7PTvNnBcBMLZFw3PfoxcZ3PJ6wwkdaHRswqKDm\n +xUQ==",
        "X-Gm-Message-State": "AOJu0YxDgLm3bc4yoyaLCmi9g7MF/iyPDPtPfvnqShIvea0HDdTE1xNu\n /7xSUGT1uifFXYWlRW0XjpjzIu9zfnn3fzezEXQcRglAxFVBP8erIsYCPJ5np8e0fw4F+RiDcdv\n u",
        "X-Google-Smtp-Source": "\n AGHT+IFOEHcevhcYogYA8TVNDntNikwAKIzvQqR2BnyOny24ydPI1qzWm+2C5gDGxxA9bLGyUyU0xw==",
        "X-Received": "by 2002:a17:903:2409:b0:1dc:81b8:cc1e with SMTP id\n e9-20020a170903240900b001dc81b8cc1emr7419844plo.60.1708980713650;\n Mon, 26 Feb 2024 12:51:53 -0800 (PST)",
        "From": "Stephen Hemminger <stephen@networkplumber.org>",
        "To": "dev@dpdk.org",
        "Cc": "Stephen Hemminger <stephen@networkplumber.org>,\n Isaac Boukris <iboukris@gmail.com>, Reshma Pattan <reshma.pattan@intel.com>",
        "Subject": "[PATCH 1/2] app/dumpcap: handle SIGTERM and SIGHUP",
        "Date": "Mon, 26 Feb 2024 12:49:48 -0800",
        "Message-ID": "<20240226205143.66702-2-stephen@networkplumber.org>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20240226205143.66702-1-stephen@networkplumber.org>",
        "References": "<20240226205143.66702-1-stephen@networkplumber.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "If application is killed (SIGTERM), or the console session\nends (SIGHUP) or the write to the output file fails (SIGPIPE)\nthen do cleanup before exiting.\n\nThis also makes DPDK dumpcap behave more like Wireshark dumpcap.\n\nSuggested-by: Isaac Boukris <iboukris@gmail.com>\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\n---\n app/dumpcap/main.c | 14 ++++++++++++--\n 1 file changed, 12 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/app/dumpcap/main.c b/app/dumpcap/main.c\nindex d57db0589a3f..76c747511444 100644\n--- a/app/dumpcap/main.c\n+++ b/app/dumpcap/main.c\n@@ -939,6 +939,11 @@ int main(int argc, char **argv)\n {\n \tstruct rte_ring *r;\n \tstruct rte_mempool *mp;\n+\tstruct sigaction action = {\n+\t\t.sa_flags = SA_RESTART,\n+\t\t.sa_handler = signal_handler,\n+\t};\n+\tstruct sigaction origaction;\n \tdumpcap_out_t out;\n \tchar *p;\n \n@@ -964,8 +969,13 @@ int main(int argc, char **argv)\n \n \tcompile_filters();\n \n-\tsignal(SIGINT, signal_handler);\n-\tsignal(SIGPIPE, SIG_IGN);\n+\tsigemptyset(&action.sa_mask);\n+\tsigaction(SIGTERM, &action, NULL);\n+\tsigaction(SIGINT, &action, NULL);\n+\tsigaction(SIGPIPE, &action, NULL);\n+\tsigaction(SIGHUP, NULL, &origaction);\n+\tif (origaction.sa_handler == SIG_DFL)\n+\t\tsigaction(SIGHUP, &action, NULL);\n \n \tenable_primary_monitor();\n \n",
    "prefixes": [
        "1/2"
    ]
}