{
    "mode": "man",
    "parameter": "siginfo_t",
    "section": "3type",
    "url": "https://www.chedong.com/phpMan.php/man/siginfo_t/3type/json",
    "generated": "2026-10-04T08:58:47Z",
    "sections": {
        "NAME": {
            "content": "systemdatatypes - overview of system data types\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "siginfot\nInclude: <signal.h>.  Alternatively, <sys/wait.h>.\n\ntypedef struct {\nint      sisigno;  /* Signal number */\nint      sicode;   /* Signal code */\npidt    sipid;    /* Sending process ID */\nuidt    siuid;    /* Real user ID of sending process */\nvoid    *siaddr;   /* Memory location which caused fault */\nint      sistatus; /* Exit value or signal */\nunion sigval sivalue;  /* Signal value */\n} siginfot;\n\nInformation  associated with a signal.  For further details on this structure (includ‐\ning additional, Linux-specific fields), see sigaction(2).\n\nConforming to: POSIX.1-2001 and later.\n\nSee  also:  pidfdsendsignal(2),  rtsigqueueinfo(2),  sigaction(2),  sigwaitinfo(2),\npsiginfo(3)\n\nsigsett\nInclude: <signal.h>.  Alternatively, <spawn.h>, or <sys/select.h>.\n\nThis is a type that represents a set of signals.  According to POSIX, this shall be an\ninteger or structure type.\n\nConforming to: POSIX.1-2001 and later.\n\nSee  also:  epollpwait(2),  ppoll(2), pselect(2), sigaction(2), signalfd(2), sigpend‐\ning(2), sigprocmask(2), sigsuspend(2), sigwaitinfo(2), signal(7)\n",
            "subsections": []
        },
        "NOTES": {
            "content": "The structures described in this manual page shall contain, at least, the  members  shown  in\ntheir definition, in no particular order.\n\nMost  of  the integer types described in this page don't have a corresponding length modifier\nfor the printf(3) and the scanf(3) families of functions.  To print a  value  of  an  integer\ntype  that doesn't have a length modifier, it should be converted to intmaxt or uintmaxt by\nan explicit cast.  To scan into a variable of an integer type that doesn't have a length mod‐\nifier, an intermediate temporary variable of type intmaxt or uintmaxt should be used.  When\ncopying from the temporary variable to the destination variable, the  value  could  overflow.\nIf  the type has upper and lower limits, the user should check that the value is within those\nlimits, before actually copying the value.  The example below  shows  how  these  conversions\nshould be done.\n",
            "subsections": [
                {
                    "name": "Conventions used in this page",
                    "content": "In  \"Conforming  to\" we only concern ourselves with C99 and later and POSIX.1-2001 and later.\nSome types may be specified in earlier versions of one of these standards, but in the  inter‐\nests of simplicity we omit details from earlier standards.\n\nIn  \"Include\", we first note the \"primary\" header(s) that define the type according to either\nthe C or POSIX.1 standards.  Under \"Alternatively\", we note additional headers that the stan‐\ndards specify shall define the type.\n"
                }
            ]
        },
        "EXAMPLES": {
            "content": "The program shown below scans from a string and prints a value stored in a variable of an in‐\nteger type that doesn't have a length modifier.  The appropriate conversions from and to int‐\nmaxt, and the appropriate range checks, are used as explained in the notes section above.\n\n#include <stdint.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <sys/types.h>\n\nint\nmain (void)\n{\nstatic const char *const str = \"500000 us in half a second\";\nsusecondst us;\nintmaxt    tmp;\n\n/* Scan the number from the string into the temporary variable. */\n\nsscanf(str, \"%jd\", &tmp);\n\n/* Check that the value is within the valid range of susecondst. */\n\nif (tmp < -1 || tmp > 1000000) {\nfprintf(stderr, \"Scanned value outside valid range!\\n\");\nexit(EXITFAILURE);\n}\n\n/* Copy the value to the susecondst variable 'us'. */\n\nus = tmp;\n\n/* Even though susecondst can hold the value -1, this isn't\na sensible number of microseconds. */\n\nif (us < 0) {\nfprintf(stderr, \"Scanned value shouldn't be negative!\\n\");\nexit(EXITFAILURE);\n}\n\n/* Print the value. */\n\nprintf(\"There are %jd microseconds in half a second.\\n\",\n(intmaxt) us);\n\nexit(EXITSUCCESS);\n}\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "featuretestmacros(7), standards(7)\n\nLinux man-pages 6.7                          2023-10-31                         systemdatatypes(7)",
            "subsections": []
        }
    },
    "summary": "systemdatatypes - overview of system data types",
    "flags": [],
    "examples": [
        "The program shown below scans from a string and prints a value stored in a variable of an in‐",
        "teger type that doesn't have a length modifier.  The appropriate conversions from and to int‐",
        "maxt, and the appropriate range checks, are used as explained in the notes section above.",
        "#include <stdint.h>",
        "#include <stdio.h>",
        "#include <stdlib.h>",
        "#include <sys/types.h>",
        "int",
        "main (void)",
        "static const char *const str = \"500000 us in half a second\";",
        "susecondst us;",
        "intmaxt    tmp;",
        "/* Scan the number from the string into the temporary variable. */",
        "sscanf(str, \"%jd\", &tmp);",
        "/* Check that the value is within the valid range of susecondst. */",
        "if (tmp < -1 || tmp > 1000000) {",
        "fprintf(stderr, \"Scanned value outside valid range!\\n\");",
        "exit(EXITFAILURE);",
        "/* Copy the value to the susecondst variable 'us'. */",
        "us = tmp;",
        "/* Even though susecondst can hold the value -1, this isn't",
        "a sensible number of microseconds. */",
        "if (us < 0) {",
        "fprintf(stderr, \"Scanned value shouldn't be negative!\\n\");",
        "exit(EXITFAILURE);",
        "/* Print the value. */",
        "printf(\"There are %jd microseconds in half a second.\\n\",",
        "(intmaxt) us);",
        "exit(EXITSUCCESS);"
    ],
    "see_also": [
        {
            "name": "featuretestmacros",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/featuretestmacros/7/json"
        },
        {
            "name": "standards",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/standards/7/json"
        }
    ]
}