mirror of
https://github.com/AthanorLabs/atomic-swap.git
synced 2026-01-07 21:34:05 -05:00
23 lines
559 B
Go
23 lines
559 B
Go
// Copyright 2023 The AthanorLabs/atomic-swap Authors
|
|
// SPDX-License-Identifier: LGPL-3.0-only
|
|
|
|
//go:build linux || freebsd
|
|
|
|
package monero
|
|
|
|
import (
|
|
"syscall"
|
|
)
|
|
|
|
func init() {
|
|
// If the parent swapd or other executable that starts monero-wallet-rpc exits
|
|
// without shutting down the child process, instruct the OS to send
|
|
// monero-wallet-rpc SIGTERM. Unfortunately, the syscall to support this only
|
|
// exists on Linux and FreeBSD.
|
|
getSysProcAttr = func() *syscall.SysProcAttr {
|
|
return &syscall.SysProcAttr{
|
|
Pdeathsig: syscall.SIGTERM,
|
|
}
|
|
}
|
|
}
|