{
    "mode": "man",
    "parameter": "sigevent",
    "section": "7",
    "url": "https://www.chedong.com/phpMan.php/man/sigevent/7/json",
    "generated": "2026-05-30T05:14:50Z",
    "synopsis": "#include <signal.h>\nunion sigval {            /* Data passed with notification */\nint     sivalint;    /* Integer value */\nvoid   *sivalptr;    /* Pointer value */\n};\nstruct sigevent {\nint    sigevnotify;  /* Notification method */\nint    sigevsigno;   /* Notification signal */\nunion sigval sigevvalue;\n/* Data passed with notification */\nvoid (*sigevnotifyfunction) (union sigval);\n/* Function used for thread\nnotification (SIGEVTHREAD) */\nvoid  *sigevnotifyattributes;\n/* Attributes for notification thread\n(SIGEVTHREAD) */\npidt  sigevnotifythreadid;\n/* ID of thread to signal\n(SIGEVTHREADID); Linux-specific */\n};",
    "sections": {
        "NAME": {
            "content": "sigevent - structure for notification from asynchronous routines\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "#include <signal.h>\n\nunion sigval {            /* Data passed with notification */\nint     sivalint;    /* Integer value */\nvoid   *sivalptr;    /* Pointer value */\n};\n\nstruct sigevent {\nint    sigevnotify;  /* Notification method */\nint    sigevsigno;   /* Notification signal */\nunion sigval sigevvalue;\n/* Data passed with notification */\nvoid (*sigevnotifyfunction) (union sigval);\n/* Function used for thread\nnotification (SIGEVTHREAD) */\nvoid  *sigevnotifyattributes;\n/* Attributes for notification thread\n(SIGEVTHREAD) */\npidt  sigevnotifythreadid;\n/* ID of thread to signal\n(SIGEVTHREADID); Linux-specific */\n};\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The  sigevent  structure is used by various APIs to describe the way a process is to be noti‐\nfied about an event (e.g., completion of an asynchronous request, expiration of a  timer,  or\nthe arrival of a message).\n\nThe  definition  shown  in  the  SYNOPSIS  is approximate: some of the fields in the sigevent\nstructure may be defined as part of a union.  Programs should employ only those fields  rele‐\nvant to the value specified in sigevnotify.\n\nThe  sigevnotify  field  specifies how notification is to be performed.  This field can have\none of the following values:\n\nSIGEVNONE\nA \"null\" notification: don't do anything when the event occurs.\n\nSIGEVSIGNAL\nNotify the process by sending the signal specified in sigevsigno.\n\nIf the signal is caught with a signal handler that was  registered  using  the  sigac‐‐\ntion(2)  SASIGINFO flag, then the following fields are set in the siginfot structure\nthat is passed as the second argument of the handler:\n\nsicode   This field is set to a value that depends on the API delivering the  notifi‐\ncation.\n\nsisigno  This  field  is  set  to  the  signal  number  (i.e.,  the  same value as in\nsigevsigno).\n\nsivalue  This field is set to the value specified in sigevvalue.\n\nDepending on the API, other fields may also be set in the siginfot structure.\n\nThe same information is also available if the signal is accepted using sigwaitinfo(2).\n\nSIGEVTHREAD\nNotify the process by invoking sigevnotifyfunction \"as if\" it were the  start  func‐\ntion  of  a  new  thread.   (Among the implementation possibilities here are that each\ntimer notification could result in the creation of a new  thread,  or  that  a  single\nthread  is  created  to  receive  all  notifications.)   The  function is invoked with\nsigevvalue as its sole argument.  If sigevnotifyattributes is not NULL,  it  should\npoint  to  a  pthreadattrt structure that defines attributes for the new thread (see\npthreadattrinit(3)).\n\nSIGEVTHREADID (Linux-specific)\nCurrently used only by POSIX timers; see timercreate(2).\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "timercreate(2), aiofsync(3), aioread(3),  aiowrite(3),  getaddrinfoa(3),  liolistio(3),\nmqnotify(3), aio(7), pthreads(7)\n",
            "subsections": []
        },
        "COLOPHON": {
            "content": "This  page  is  part  of  release  5.10 of the Linux man-pages project.  A description of the\nproject, information about reporting bugs, and the latest version of this page, can be  found\nat https://www.kernel.org/doc/man-pages/.\n\n\n\nGNU                                          2020-11-01                                  SIGEVENT(7)",
            "subsections": []
        }
    },
    "summary": "sigevent - structure for notification from asynchronous routines",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "timercreate",
            "section": "2",
            "url": "https://www.chedong.com/phpMan.php/man/timercreate/2/json"
        },
        {
            "name": "aiofsync",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/aiofsync/3/json"
        },
        {
            "name": "aioread",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/aioread/3/json"
        },
        {
            "name": "aiowrite",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/aiowrite/3/json"
        },
        {
            "name": "getaddrinfoa",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/getaddrinfoa/3/json"
        },
        {
            "name": "liolistio",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/liolistio/3/json"
        },
        {
            "name": "mqnotify",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/mqnotify/3/json"
        },
        {
            "name": "aio",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/aio/7/json"
        },
        {
            "name": "pthreads",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/pthreads/7/json"
        }
    ]
}