Revert "snapuserd: Handle real time signal 36"
This reverts commit 8d3b31fe68
.
Reason for revert: With https://r.android.com/1840754, bionic will handle the real time signal for statically linked binaries.
Change-Id: I81f0892f1734c7ecfb604820a8894506df8618b3
This commit is contained in:
parent
8d3b31fe68
commit
fec60563c4
2 changed files with 0 additions and 27 deletions
|
@ -109,7 +109,6 @@ class CowSnapuserdTest final {
|
|||
void MergeInterruptRandomly(int max_duration);
|
||||
void ReadDmUserBlockWithoutDaemon();
|
||||
void ReadLastBlock();
|
||||
void TestRealTimeSignal();
|
||||
|
||||
std::string snapshot_dev() const { return snapshot_dev_->path(); }
|
||||
|
||||
|
@ -153,7 +152,6 @@ class CowSnapuserdTest final {
|
|||
size_t size_ = 50_MiB;
|
||||
int cow_num_sectors_;
|
||||
int total_base_size_;
|
||||
pid_t pid_;
|
||||
};
|
||||
|
||||
class CowSnapuserdMetadataTest final {
|
||||
|
@ -256,7 +254,6 @@ void CowSnapuserdTest::StartSnapuserdDaemon() {
|
|||
} else {
|
||||
client_ = SnapuserdClient::Connect(kSnapuserdSocketTest, 10s);
|
||||
ASSERT_NE(client_, nullptr);
|
||||
pid_ = pid;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -772,16 +769,6 @@ void CowSnapuserdTest::CreateSnapshotDevice() {
|
|||
ASSERT_FALSE(snapshot_dev_->path().empty());
|
||||
}
|
||||
|
||||
void CowSnapuserdTest::TestRealTimeSignal() {
|
||||
StartSnapuserdDaemon();
|
||||
ASSERT_EQ(kill(pid_, 36), 0); // Real time signal 36
|
||||
ASSERT_EQ(kill(pid_, 0), 0); // Verify pid exists
|
||||
ASSERT_TRUE(client_->DetachSnapuserd());
|
||||
std::this_thread::sleep_for(1s);
|
||||
client_->CloseConnection();
|
||||
client_ = nullptr;
|
||||
}
|
||||
|
||||
void CowSnapuserdTest::SetupImpl() {
|
||||
CreateBaseDevice();
|
||||
CreateCowDevice();
|
||||
|
@ -1291,11 +1278,6 @@ TEST(Snapuserd_Test, Snapshot_Merge_Crash_Random_Inverted) {
|
|||
harness.Shutdown();
|
||||
}
|
||||
|
||||
TEST(Snapuserd_Test, Snapshot_TestRealTimeSignal) {
|
||||
CowSnapuserdTest harness;
|
||||
harness.TestRealTimeSignal();
|
||||
}
|
||||
|
||||
} // namespace snapshot
|
||||
} // namespace android
|
||||
|
||||
|
|
|
@ -29,8 +29,6 @@ DEFINE_bool(no_socket, false,
|
|||
DEFINE_bool(socket_handoff, false,
|
||||
"If true, perform a socket hand-off with an existing snapuserd instance, then exit.");
|
||||
|
||||
constexpr int kProfilingSignal = __SIGRTMIN + 4;
|
||||
|
||||
namespace android {
|
||||
namespace snapshot {
|
||||
|
||||
|
@ -41,7 +39,6 @@ bool Daemon::StartServer(int argc, char** argv) {
|
|||
sigdelset(&signal_mask_, SIGINT);
|
||||
sigdelset(&signal_mask_, SIGTERM);
|
||||
sigdelset(&signal_mask_, SIGUSR1);
|
||||
sigdelset(&signal_mask_, kProfilingSignal);
|
||||
|
||||
// Masking signals here ensure that after this point, we won't handle INT/TERM
|
||||
// until after we call into ppoll()
|
||||
|
@ -49,7 +46,6 @@ bool Daemon::StartServer(int argc, char** argv) {
|
|||
signal(SIGTERM, Daemon::SignalHandler);
|
||||
signal(SIGPIPE, Daemon::SignalHandler);
|
||||
signal(SIGUSR1, Daemon::SignalHandler);
|
||||
signal(kProfilingSignal, Daemon::SignalHandler);
|
||||
|
||||
MaskAllSignalsExceptIntAndTerm();
|
||||
|
||||
|
@ -87,7 +83,6 @@ void Daemon::MaskAllSignalsExceptIntAndTerm() {
|
|||
sigdelset(&signal_mask, SIGTERM);
|
||||
sigdelset(&signal_mask, SIGPIPE);
|
||||
sigdelset(&signal_mask, SIGUSR1);
|
||||
sigdelset(&signal_mask, kProfilingSignal);
|
||||
if (sigprocmask(SIG_SETMASK, &signal_mask, NULL) != 0) {
|
||||
PLOG(ERROR) << "Failed to set sigprocmask";
|
||||
}
|
||||
|
@ -121,10 +116,6 @@ void Daemon::SignalHandler(int signal) {
|
|||
LOG(ERROR) << "Received SIGPIPE signal";
|
||||
break;
|
||||
}
|
||||
case kProfilingSignal: {
|
||||
LOG(INFO) << "Received real-time signal SIGRTMIN+4";
|
||||
break;
|
||||
}
|
||||
case SIGUSR1: {
|
||||
LOG(INFO) << "Received SIGUSR1, attaching to proxy socket";
|
||||
Daemon::Instance().ReceivedSocketSignal();
|
||||
|
|
Loading…
Reference in a new issue