7 Commits

Author SHA1 Message Date
Evan Jones
85bd1af331
osutil: remove unused Unsetenv function
The osutil.Unsetenv function is not used. Today, os.Unsetenv exists
in the standard library, and is already used elsewhere in etcd.
Removing this function could break things that may be importing this
package. According to pkg.go.dev, it seems like the only thing is
etcd forks, so it may be worth getting rid of this code. See:

https://pkg.go.dev/github.com/coreos/etcd/pkg/osutil?tab=importedby

Signed-off-by: Evan Jones <ej@evanjones.ca>
2023-10-17 09:07:47 -04:00
Marek Siarkowicz
804fddf921 tests: Use zaptest.NewLogger in tests 2022-04-04 13:03:15 +02:00
Gyuho Lee
0dad8abb6f pkg: support structured logger
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-16 17:36:00 -07:00
Anthony Romano
7a1739a3e8 osutil: force SIG_DFL before resending terminating signal
The go runtime won't always reinstall the default signal handler on the
SIGTERM path, so it's possible the signal won't terminate the process.
Instead, force SIG_DFL for the signal.
2017-05-12 11:56:27 -07:00
Gyu-Ho Lee
8b77de4e99 pkg: update LICENSE header 2016-05-12 20:48:53 -07:00
Fabian Reinartz
8bf795dc3c etcdmain/osutil: shutdown gracefully, interrupt handling
The functionality in pkg/osutil ensures that all interrupt handlers finish
and the process kills itself with the proper signal.
Test for interrupt handling added.
The server shutsdown gracefully by stopping on interrupt (Issue #2277.)
2015-02-13 10:28:53 +01:00
Yicheng Qin
871e92ef73 pkg/osutil: add Unsetenv
go1.4 doesn't support static link well, so we stay in go1.3 for a while.
Implement Unsetenv in go1.3 way.
2015-02-04 10:29:20 -08:00