You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* N O T E S
#include <sys/procfs.h>
#include <fcntl.h>
#include <errno.h>
-#include <string.h>
+#include "gdb_string.h"
#include <stropts.h>
#include <poll.h>
#include <unistd.h>
-#include <sys/stat.h>
+#include "gdb_stat.h"
#include "inferior.h"
#include "target.h"
signo = SIGKILL;
+#ifdef PROCFS_NEED_CLEAR_CURSIG_FOR_KILL
+ /* Alpha OSF/1-3.x procfs needs a clear of the current signal
+ before the PIOCKILL, otherwise it might generate a corrupted core
+ file for the inferior. */
+ ioctl (pi->fd, PIOCSSIG, NULL);
+#endif
#ifdef PROCFS_NEED_PIOCSSIG_FOR_KILL
- /* Alpha OSF/1 procfs needs a PIOCSSIG call with a SIGKILL signal
+ /* Alpha OSF/1-2.x procfs needs a PIOCSSIG call with a SIGKILL signal
to kill the inferior, otherwise it might remain stopped with a
pending SIGKILL.
We do not check the result of the PIOCSSIG, the inferior might have