vfs: check userland buffers before reading them.
[haiku.git] / src / kits / debugger / model / SignalInfo.cpp
blobe91a53c7423253a13309090ede12b921a0d94609
1 /*
2 * Copyright 2015, Rene Gollent, rene@gollent.com.
3 * Distributed under the terms of the MIT License.
4 */
6 #include "SignalInfo.h"
8 #include <string.h>
11 SignalInfo::SignalInfo()
13 fSignal(0),
14 fDeadly(false)
16 memset(&fHandler, 0, sizeof(fHandler));
20 SignalInfo::SignalInfo(const SignalInfo& other)
22 fSignal(other.fSignal),
23 fDeadly(other.fDeadly)
25 memcpy(&fHandler, &other.fHandler, sizeof(fHandler));
29 SignalInfo::SignalInfo(int signal, const struct sigaction& handler,
30 bool deadly)
32 fSignal(signal),
33 fDeadly(deadly)
35 memcpy(&fHandler, &handler, sizeof(fHandler));
39 void
40 SignalInfo::SetTo(int signal, const struct sigaction& handler, bool deadly)
42 fSignal = signal;
43 fDeadly = deadly;
45 memcpy(&fHandler, &handler, sizeof(fHandler));