diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-01-23 22:23:46 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-01-23 22:23:46 +0000 |
commit | 340a72b7cdfb3c1c79044f53decc055ee6c06f19 (patch) | |
tree | dbc9c30e5aec5ddcdf6f0abd2b9a9416721c9bce /nuttx/include | |
parent | f86f863834bf7eae566e4ccce00ecfef3f914b05 (diff) | |
download | px4-firmware-340a72b7cdfb3c1c79044f53decc055ee6c06f19.tar.gz px4-firmware-340a72b7cdfb3c1c79044f53decc055ee6c06f19.tar.bz2 px4-firmware-340a72b7cdfb3c1c79044f53decc055ee6c06f19.zip |
Add logic to retain child task exit status if so configured
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5553 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include')
-rw-r--r-- | nuttx/include/nuttx/sched.h | 3 | ||||
-rw-r--r-- | nuttx/include/signal.h | 12 | ||||
-rw-r--r-- | nuttx/include/sys/types.h | 4 |
3 files changed, 11 insertions, 8 deletions
diff --git a/nuttx/include/nuttx/sched.h b/nuttx/include/nuttx/sched.h index 9ab96b7d2..1e75b5020 100644 --- a/nuttx/include/nuttx/sched.h +++ b/nuttx/include/nuttx/sched.h @@ -74,6 +74,7 @@ #define TCB_FLAG_NONCANCELABLE (1 << 2) /* Bit 2: Pthread is non-cancelable */ #define TCB_FLAG_CANCEL_PENDING (1 << 3) /* Bit 3: Pthread cancel is pending */ #define TCB_FLAG_ROUND_ROBIN (1 << 4) /* Bit 4: Round robin sched enabled */ +#define TCB_FLAG_NOCLDWAIT (1 << 5) /* Bit 5: Do not retain child exit status */ /* Values for struct child_status_s ch_flags */ @@ -183,7 +184,7 @@ struct child_status_s FAR struct child_status_s *flink; uint8_t ch_flags; /* Child status: See CHILD_FLAG_* definitions */ - pid_y ch_pid; /* Child task ID */ + pid_t ch_pid; /* Child task ID */ int ch_status; /* Child exit status */ }; #endif diff --git a/nuttx/include/signal.h b/nuttx/include/signal.h index 7c6b4cd55..a02170242 100644 --- a/nuttx/include/signal.h +++ b/nuttx/include/signal.h @@ -129,11 +129,13 @@ /* struct sigaction flag values */ -#define SA_NOCLDSTOP 1 /* Do not generate SIGCHILD when - * children stop (ignored) */ -#define SA_SIGINFO 2 /* Invoke the signal-catching function - * with 3 args instead of 1 - * (always assumed) */ +#define SA_NOCLDSTOP (1 << 0) /* Do not generate SIGCHILD when + * children stop (ignored) */ +#define SA_SIGINFO (1 << 1) /* Invoke the signal-catching function + * with 3 args instead of 1 + * (always assumed) */ +#define SA_NOCLDWAIT (1 << 2) /* If signo=SIGCHLD, exit status of child + * processes will be discarded */ /* These are the possible values of the signfo si_code field */ diff --git a/nuttx/include/sys/types.h b/nuttx/include/sys/types.h index 95feee72e..38f091e8a 100644 --- a/nuttx/include/sys/types.h +++ b/nuttx/include/sys/types.h @@ -158,13 +158,13 @@ typedef uint16_t ino_t; * negative PID values are used to represent invalid PIDs. */ -typedef int pid_t; +typedef int16_t pid_t; /* id_t is a general identifier that can be used to contain at least a pid_t, * uid_t, or gid_t. */ -typedef unsigned int id_t; +typedef int16_t id_t; /* Signed integral type of the result of subtracting two pointers */ |