Change name from commune_recv to commune_process throughout. Change name from

commune_send to commune_request throughout.
* pinfo.h (PICOM_EXTRASTR): New flag.
(PICOM_FIFO): Define with new flag.
(_pinfo::hello_pid): Delete.
(_pinfo::tothem): Delete.
(_pinfo::fromthem): Delete.
(_pinfo::commune_process): Rename from commune_recv.  Add a siginfo_t argument
to declaration.
(_pinfo::commune_request): Rename from commune_send.  Change DWORD to
__uint32_t in declaration.
* pinfo.cc (_pinfo::commune_process): Rename from commune_recv.  Add siginfo_t
argument.  Use information from argument rather than reading from another pipe.
Synchronize with other process's commune event.
(_pinfo::commune_request): Rename from commune_send.  Change DWORD to __uint32
in argument.  Fill out information in new siginfo_t element and rely on
extended operation of sig_send rather than trying to deal with synchronization
issues here.  Use process handle and read pipe information filled out by
sig_send to gather information from the other process.
* sigproc.cc (sig_send): Take special action if "communing" to ensure
synchronization with the other process and to return information about the
other process to the caller.
(talktome): Accept a siginfo_t and handle arguments.  Read additional
information from the signal pipe when _si_commune._si_code has the
PICOM_EXTRASTR flag set.
(wait_sig): Pass the transmitted siginfo_t struct and the pipe handle to
talktome.  Close pipe read handle as soon as possible after we detect that
we're exiting.
This commit is contained in:
Christopher Faylor
2005-09-28 22:56:47 +00:00
parent 503490bb9f
commit 0730fa0763
6 changed files with 219 additions and 249 deletions

View File

@ -42,6 +42,20 @@ typedef struct sigevent
} sigevent_t;
#pragma pack(push,4)
struct _sigcommune
{
__uint32_t _si_code;
void *_si_read_handle;
void *_si_write_handle;
void *_si_process_handle;
union
{
int _si_fd;
void *_si_pipe_fhandler;
char *_si_str;
};
};
typedef struct
{
int si_signo; /* signal number */
@ -53,6 +67,7 @@ typedef struct
union
{
__uint32_t __pad[32]; /* plan for future growth */
struct _sigcommune _si_commune; /* cygwin ipc */
union
{
/* timers */