Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Levin Zimmermann
wendelin.core
Commits
df4ed10f
Commit
df4ed10f
authored
Sep 27, 2023
by
Levin Zimmermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x signinfo?
parent
9544fc02
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
2 deletions
+16
-2
wcfs/go.mod
wcfs/go.mod
+1
-0
wcfs/wcfs.go
wcfs/wcfs.go
+15
-2
No files found.
wcfs/go.mod
View file @
df4ed10f
...
@@ -9,6 +9,7 @@ require (
...
@@ -9,6 +9,7 @@ require (
github.com/kisielk/og-rek v1.2.0
github.com/kisielk/og-rek v1.2.0
github.com/pkg/errors v0.9.1
github.com/pkg/errors v0.9.1
github.com/stretchr/testify v1.8.4
github.com/stretchr/testify v1.8.4
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect
lab.nexedi.com/kirr/go123 v0.0.0-20230714134036-155506a9880e
lab.nexedi.com/kirr/go123 v0.0.0-20230714134036-155506a9880e
lab.nexedi.com/kirr/neo/go v0.0.0-20230524100036-4c9414ea9a03
lab.nexedi.com/kirr/neo/go v0.0.0-20230524100036-4c9414ea9a03
)
)
...
...
wcfs/wcfs.go
View file @
df4ed10f
...
@@ -509,6 +509,8 @@ import (
...
@@ -509,6 +509,8 @@ import (
"github.com/hanwen/go-fuse/v2/fuse/nodefs"
"github.com/hanwen/go-fuse/v2/fuse/nodefs"
"github.com/pkg/errors"
"github.com/pkg/errors"
"golang.org/x/sys/unix"
"lab.nexedi.com/nexedi/wendelin.core/wcfs/internal/xzodb"
"lab.nexedi.com/nexedi/wendelin.core/wcfs/internal/xzodb"
"lab.nexedi.com/nexedi/wendelin.core/wcfs/internal/zdata"
"lab.nexedi.com/nexedi/wendelin.core/wcfs/internal/zdata"
)
)
...
@@ -1495,12 +1497,23 @@ func (w *Watch) _pin(ctx context.Context, blk int64, rev zodb.Tid) (err error) {
...
@@ -1495,12 +1497,23 @@ func (w *Watch) _pin(ctx context.Context, blk int64, rev zodb.Tid) (err error) {
// access to which address generated this error going in si_addr field of
// access to which address generated this error going in si_addr field of
// siginfo structure. It would be good if we can mimic that behaviour to a
// siginfo structure. It would be good if we can mimic that behaviour to a
// reasonable extent if possible."
// reasonable extent if possible."
err
:=
syscall
.
Kill
(
pid
,
syscall
.
Signal
(
syscall
.
SIGBUS
))
//
// we need https://pkg.go.dev/golang.org/x/sys/unix#SignalfdSiginfo
// but there seems to be no API to use this struct?
// => wait, that's https://linux.die.net/man/2/signalfd
// ('signalfd_siginfo'), which is different to siginfo_t,
// see https://man7.org/linux/man-pages/man2/sigaction.2.html
//
// maybe we need to implement something similar to
//
// https://cs.opensource.google/go/x/sys/+/refs/tags/v0.12.0:unix/zsyscall_linux.go;l=2106-2111
// ?
err
:=
unix
.
Kill
(
pid
,
syscall
.
Signal
(
syscall
.
SIGBUS
))
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
if
isProcessAlive
(
pid
,
time
.
Second
*
1
)
{
if
isProcessAlive
(
pid
,
time
.
Second
*
1
)
{
err
=
syscall
.
Kill
(
pid
,
syscall
.
Signal
(
syscall
.
SIGKILL
))
err
=
unix
.
Kill
(
pid
,
syscall
.
Signal
(
syscall
.
SIGKILL
))
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment