K
K
kazhuravlev2014-07-14 12:52:15
go
kazhuravlev, 2014-07-14 12:52:15

How to set process name in Go?

How to set process name in Golang? (I want to see my running command with some name through ps)
In general, how does it look from the OS side?
What kind of attribute is this - the name of the process? Where is it stored?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
SilentFl, 2014-07-14
@SilentFl

The process name is given, as in other languages, by the name of the binary

>go build -o myCoolProgram myHelloWorld.go
>./myCoolProgram
>ps aux | grep myCoolProgram
>user    4239  0.0  0.0 849312  1920 pts/0    Sl+  13:59   0:00 ./myCoolProgram

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question