From 8cb7d3dcfcbe11a6d5682743816409d1c8e8f6a0 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 20 Sep 2017 21:18:36 +0200 Subject: all: initial support for fuchsia Nothing works, but builds. Update #191 --- tools/syz-execprog/execprog_linux.go | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 tools/syz-execprog/execprog_linux.go (limited to 'tools/syz-execprog/execprog_linux.go') diff --git a/tools/syz-execprog/execprog_linux.go b/tools/syz-execprog/execprog_linux.go new file mode 100644 index 000000000..01e74cec5 --- /dev/null +++ b/tools/syz-execprog/execprog_linux.go @@ -0,0 +1,23 @@ +// Copyright 2017 syzkaller project authors. All rights reserved. +// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. + +package main + +import ( + "os" + "os/signal" + "sync/atomic" + "syscall" + + "github.com/google/syzkaller/pkg/log" +) + +func handleInterrupt(shutdown *uint32) { + c := make(chan os.Signal, 2) + signal.Notify(c, syscall.SIGINT) + <-c + log.Logf(0, "shutting down...") + atomic.StoreUint32(shutdown, 1) + <-c + log.Fatalf("terminating") +} -- cgit mrf-deployment