Skip to content

Commit

Permalink
bpo-31904: Adapt the _signal module to VxWorks RTOS (pythonGH-12304)
Browse files Browse the repository at this point in the history
Limited signal fields in VxWorks.
  • Loading branch information
pxinwr authored and vstinner committed Mar 13, 2019
1 parent 9776b06 commit 8b5bdda
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add _signal module support for VxWorks.
7 changes: 7 additions & 0 deletions Modules/signalmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -1079,11 +1079,18 @@ fill_siginfo(siginfo_t *si)

PyStructSequence_SET_ITEM(result, 0, PyLong_FromLong((long)(si->si_signo)));
PyStructSequence_SET_ITEM(result, 1, PyLong_FromLong((long)(si->si_code)));
#ifdef __VXWORKS__
PyStructSequence_SET_ITEM(result, 2, PyLong_FromLong(0L));
PyStructSequence_SET_ITEM(result, 3, PyLong_FromLong(0L));
PyStructSequence_SET_ITEM(result, 4, PyLong_FromLong(0L));
PyStructSequence_SET_ITEM(result, 5, PyLong_FromLong(0L));
#else
PyStructSequence_SET_ITEM(result, 2, PyLong_FromLong((long)(si->si_errno)));
PyStructSequence_SET_ITEM(result, 3, PyLong_FromPid(si->si_pid));
PyStructSequence_SET_ITEM(result, 4, _PyLong_FromUid(si->si_uid));
PyStructSequence_SET_ITEM(result, 5,
PyLong_FromLong((long)(si->si_status)));
#endif
#ifdef HAVE_SIGINFO_T_SI_BAND
PyStructSequence_SET_ITEM(result, 6, PyLong_FromLong(si->si_band));
#else
Expand Down

0 comments on commit 8b5bdda

Please sign in to comment.