A
A
Anton Piskunov2014-11-10 04:04:39
linux
Anton Piskunov, 2014-11-10 04:04:39

How can you kill a process in Golang?

There is a demon in golang, at some point he needs to bang himself. How to do it? Also in the appendage to this question: how can a demon restart itself?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
Tyranron, 2014-11-10
@Tyranron

Use search, Luke.
We write our own linux daemon with the ability to autom...
Golang daemon
and
Working example with examples

B
Boniface, 2014-11-10
@Boniface

There is a function for this in the os package. func (p *Process) Kill() error. The Process structure contains the pid of the process.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question