mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 17:53:34 +08:00
Use SIGCHLD with waitpid(); implemented wait() and waitid()
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5515 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -154,7 +154,9 @@ typedef uint16_t dev_t;
|
||||
|
||||
typedef uint16_t ino_t;
|
||||
|
||||
/* pid_t is used for process IDs and process group IDs */
|
||||
/* pid_t is used for process IDs and process group IDs. It must be signed because
|
||||
* negative PID values are used to represent invalid PIDs.
|
||||
*/
|
||||
|
||||
typedef int pid_t;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* include/sys/wait.h
|
||||
*
|
||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2011, 2013 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -66,7 +66,7 @@
|
||||
#define WTERMSIG(s) (false) /* Return signal number that caused process to terminate */
|
||||
|
||||
/* The following symbolic constants are possible values for the options
|
||||
* argument to waitpi(1) (1) and/or waitid() (2),
|
||||
* argument to waitpid() (1) and/or waitid() (2),
|
||||
*/
|
||||
|
||||
#define WCONTINUED (1 << 0) /* Status for child that has been continued (1)(2) */
|
||||
@@ -104,9 +104,9 @@ extern "C" {
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
EXTERN pid_t wait(int *stat_loc);
|
||||
EXTERN int waitid(idtype_t idtype, id_t id, siginfo_t *siginfo, int options);
|
||||
EXTERN pid_t waitpid(pid_t pid, int *stat_loc, int options);
|
||||
EXTERN pid_t wait(FAR int *stat_loc);
|
||||
EXTERN int waitid(idtype_t idtype, id_t id, FAR siginfo_t *info, int options);
|
||||
EXTERN pid_t waitpid(pid_t pid, FAR int *stat_loc, int options);
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
|
||||
Reference in New Issue
Block a user