Re: [go-nuts] cgo pam module signal handling

2023-08-11 Thread Ian Lance Taylor
On Fri, Aug 11, 2023 at 11:51 AM Chandrasekhar R wrote: > > I am planning on using a pam module written in Go (specifically > https://github.com/uber/pam-ussh) . When I run a script which calls sudo > continuously with an echo command, I am noticing zombie/defunct processes > starting to pop

Re: [go-nuts] How to Create Dynamically Linked Go Programs Redux

2023-08-11 Thread Ian Lance Taylor
On Fri, Aug 11, 2023 at 6:15 PM jlfo...@berkeley.edu wrote: > > Now that Go 1.21 has been released, I've returned to trying to figure out how > to > dynamically link a Go program. Back in January I posted the results of my > first attempt > with an earlier version of Go, which was: > > 1)

[go-nuts] Re: slog's use of runtime.Callers() with a skip

2023-08-11 Thread Jonathan Amsterdam
The Go runtime does the right thing. On Friday, August 11, 2023 at 8:58:53 AM UTC-4 jake...@gmail.com wrote: > As far as I can tell, skip works even in the face of inlined functions, at > least when used with runtime.CallersFrames(). It would be surprising to me > if it did not. Do you have

[go-nuts] How to Create Dynamically Linked Go Programs Redux

2023-08-11 Thread jlfo...@berkeley.edu
Now that Go 1.21 has been released, I've returned to trying to figure out how to dynamically link a Go program. Back in January I posted the results of my first attempt with an earlier version of Go, which was: 1) Building a Go shared library by running go install -buildmode=shared

Re: [go-nuts] What does "shallow clone" mean?

2023-08-11 Thread shinya sakae
Many thanks! 2023年8月12日土曜日 1:14:49 UTC+9 TheDiveO: Personally, I find the source https://cs.opensource.google/go/x/exp/+/352e893a:maps/maps.go;l=65 to be helpful in quickly answering such questions. On Friday, August 11, 2023 at 4:36:50 PM UTC+2 Ian Lance Taylor wrote: On Fri, Aug 11, 2023,

[go-nuts] cgo pam module signal handling

2023-08-11 Thread Chandrasekhar R
Hey community, I am planning on using a pam module written in Go (specifically https://github.com/uber/pam-ussh) . When I run a script which calls sudo continuously with an echo command, I am noticing zombie/defunct processes starting to pop up. On doing strace, I noticed that the SIGCHLD

[go-nuts] go binary cover instrumentation for test binary

2023-08-11 Thread 'Radu Berinde' via golang-nuts
Go 1.20 adds binary instrumentation for code coverage (https://go.dev/testing/coverage/#running). We have a kind of "meta test" that is passed the path of a test binary for another package and invokes it. I want to instrument this binary for coverage (where I can use GOCOVERDIR to dump the

[go-nuts] What does `shallow clone` mean?

2023-08-11 Thread Shinya Sakae
maps package was released with Go 1.21. Clone() comment says "This is a shallow clone". I often hear the term `shallow copy', but I don't know what `shallow clone` means. What is the state of a `shallow cloned` map? Do you mean that the cloned map values are shallow copied? > Clone returns a

Re: [go-nuts] What does "shallow clone" mean?

2023-08-11 Thread TheDiveO
Personally, I find the source https://cs.opensource.google/go/x/exp/+/352e893a:maps/maps.go;l=65 to be helpful in quickly answering such questions. On Friday, August 11, 2023 at 4:36:50 PM UTC+2 Ian Lance Taylor wrote: > On Fri, Aug 11, 2023, 7:28 AM shinya sakae wrote: > >> maps package was

Re: [go-nuts] What does "shallow clone" mean?

2023-08-11 Thread Ian Lance Taylor
On Fri, Aug 11, 2023, 7:28 AM shinya sakae wrote: > maps package was released with Go 1.21. > Clone() comment says "This is a shallow clone". > I often hear the term `shallow copy', but I don't know what `shallow > clone` means. > What is the state of a `shallow cloned` map? > Do you mean that

[go-nuts] What does "shallow clone" mean?

2023-08-11 Thread shinya sakae
maps package was released with Go 1.21. Clone() comment says "This is a shallow clone". I often hear the term `shallow copy', but I don't know what `shallow clone` means. What is the state of a `shallow cloned` map? Do you mean that the cloned map values are shallow copied? -- You received this

[go-nuts] Re: slog's use of runtime.Callers() with a skip

2023-08-11 Thread jake...@gmail.com
As far as I can tell, skip works even in the face of inlined functions, at least when used with runtime.CallersFrames(). It would be surprising to me if it did not. Do you have any evidence to the contrary? On Friday, August 4, 2023 at 9:51:34 AM UTC-4 sh...@tigera.io wrote: > I was looking

[go-nuts] Is there a good way to make binary files compiled on a high-version machine run on a low-version machine?

2023-08-11 Thread 'Sebastien Binet' via golang-nuts
Did you try: export CGO_ENABLED=0 go build ? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion

[go-nuts] Re: Is there a good way to make binary files compiled on a high-version machine run on a low-version machine?

2023-08-11 Thread Peter Galbavy
I use a docker container with a centos7 image and build my shared libs there; https://github.com/ITRS-Group/cordial/blob/4f119f7893c67b817baaad23ed75b1ba134bf9c2/Dockerfile#L35 (pls don't judge my Dockerfile skills, it's a learning experience ;) ) On Thursday, 10 August 2023 at 11:12:23 UTC+1