* DevNotes: Add entry cgf-000022.
* cygtls.h (_cygtls::func): Define as a sa_sigaction style function. * exceptions.cc (sig_handle_tty_stop): Ditto. (_cygtls::interrupt_setup): Fix coercion to accommodate 'func' change. (ctrl_c_handler): Use tty kill_pgrp to send a signal. (sigpacket::process): Don't process sigflush here. (_cygtls::call_signal_handler): Reorganize to avoid a race. Always call sa_sigaction style function. * fhandler_termios.cc (is_flush_sig): Define new function. (tty_min::kill_pgrp): Handle tty flush when signal detected. (fhandler_termios::bg_check): Be slightly more paranoid about checking for valid tty. (fhandler_termios::sigflush): Don't flush unless tty owner. * fhandler_tty.cc (fhandler_pty_slave::ioctl): Use tty kill_pgrp to send signal. (fhandler_pty_master::ioctl): Ditto. * signal.cc (killsys): Delete definition. * sigproc.h (killsys): Delete declaration. * include/cygwin/signal.h (siginfo_t): Simplify union/struct nesting slightly. Implement mechanism to allow cygwin data passing.
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
/* signal.h
|
||||
|
||||
Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2011, 2012, 2013 Red
|
||||
Hat, Inc.
|
||||
Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2011, 2012, 2013
|
||||
Red Hat, Inc.
|
||||
|
||||
This file is part of Cygwin.
|
||||
|
||||
@ -90,6 +90,19 @@ struct _sigcommune
|
||||
};
|
||||
};
|
||||
|
||||
#define __SI_PAD_SIZE 32
|
||||
#ifdef __INSIDE_CYGWIN__
|
||||
# ifndef max
|
||||
# define max(a,b) (((a) > (b)) ? (a) : (b))
|
||||
# endif /*max*/
|
||||
# define __uint32_size(__x) (max(sizeof (__x) / sizeof (uint32_t), 1))
|
||||
|
||||
/* This padding represents the elements of the last struct in siginfo_t,
|
||||
aligning the elements to the end to avoid conflicts with other struct
|
||||
members. */
|
||||
# define __SI_CYG_PAD (__SI_PAD_SIZE - __uint32_size (void *))
|
||||
#endif /*__INSIDE_CYGWIN__*/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int si_signo; /* signal number */
|
||||
@ -100,26 +113,21 @@ typedef struct
|
||||
|
||||
__extension__ union
|
||||
{
|
||||
__uint32_t __pad[32]; /* plan for future growth */
|
||||
__uint32_t __pad[__SI_PAD_SIZE]; /* plan for future growth */
|
||||
struct _sigcommune _si_commune; /* cygwin ipc */
|
||||
__extension__ union
|
||||
__extension__ struct
|
||||
{
|
||||
/* timers */
|
||||
struct
|
||||
__extension__ union
|
||||
{
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
timer_t si_tid; /* timer id */
|
||||
unsigned int si_overrun; /* overrun count */
|
||||
};
|
||||
sigval_t si_sigval; /* signal value */
|
||||
sigval_t si_value; /* signal value */
|
||||
};
|
||||
sigval_t si_sigval; /* signal value */
|
||||
sigval_t si_value; /* signal value */
|
||||
};
|
||||
__extension__ struct
|
||||
{
|
||||
timer_t si_tid; /* timer id */
|
||||
unsigned int si_overrun; /* overrun count */
|
||||
};
|
||||
};
|
||||
|
||||
/* SIGCHLD */
|
||||
__extension__ struct
|
||||
{
|
||||
@ -128,13 +136,17 @@ typedef struct
|
||||
clock_t si_stime; /* system time */
|
||||
};
|
||||
|
||||
__extension__ struct
|
||||
void *si_addr; /* faulting address for core dumping
|
||||
signals */
|
||||
/* Cygwin internal fields */
|
||||
#ifdef __INSIDE_CYGWIN__
|
||||
__extension__ struct
|
||||
{
|
||||
/* core dumping signals */
|
||||
void *si_addr; /* faulting address */
|
||||
__uint32_t __pad2[__SI_CYG_PAD]; /* Locate at end of struct */
|
||||
void *si_cyg; /* pointer to block containing
|
||||
cygwin-special info */
|
||||
};
|
||||
#endif /*__INSIDE_CYGWIN__*/
|
||||
};
|
||||
} siginfo_t;
|
||||
#pragma pack(pop)
|
||||
|
Reference in New Issue
Block a user