Skip to content

Commit bb6ef47

Browse files
authored
fix windows compilation error (#2862)
1 parent 5c99bfc commit bb6ef47

File tree

7 files changed

+32
-8
lines changed

7 files changed

+32
-8
lines changed

frontend/app/block/block.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@
296296
backdrop-filter: blur(50px);
297297
border-radius: 6px;
298298
box-shadow: 0px 13px 16px 0px rgb(from var(--block-bg-color) r g b / 40%);
299-
opacity: 0.85;
299+
opacity: 0.9;
300300

301301
.connstatus-content {
302302
display: flex;

frontend/app/block/connstatusoverlay.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ const StalledOverlay = React.memo(
8080

8181
return (
8282
<div
83-
className="@container absolute top-[calc(var(--header-height)+6px)] left-1.5 right-1.5 z-[var(--zindex-block-mask-inner)] overflow-hidden rounded-md bg-[var(--conn-status-overlay-bg-color)] backdrop-blur-[50px] shadow-lg opacity-85"
83+
className="@container absolute top-[calc(var(--header-height)+6px)] left-1.5 right-1.5 z-[var(--zindex-block-mask-inner)] overflow-hidden rounded-md bg-[var(--conn-status-overlay-bg-color)] backdrop-blur-[50px] shadow-lg opacity-90"
8484
ref={overlayRefCallback}
8585
>
8686
<div className="flex items-center gap-3 w-full pt-2.5 pb-2.5 pr-2 pl-3">

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/jobcontroller/jobcontroller.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1155,6 +1155,7 @@ func doReconnectJob(ctx context.Context, jobId string, rtOpts *waveobj.RuntimeOp
11551155
return fmt.Errorf("route did not establish after successful reconnection: %w", err)
11561156
}
11571157
SetJobConnStatus(jobId, JobConnStatus_Connected)
1158+
sendBlockJobStatusEventByJob(ctx, job)
11581159

11591160
telemetry.GoRecordTEventWrap(&telemetrydata.TEvent{
11601161
Event: "job:reconnect",

pkg/shellexec/conninterface.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,13 @@ func (cw CmdWrap) KillGraceful(timeout time.Duration) {
9191
return
9292
}
9393
if runtime.GOOS == "windows" {
94-
cw.Cmd.Process.Signal(os.Interrupt)
95-
} else if cw.IsShell {
96-
syscall.Kill(cw.Cmd.Process.Pid, syscall.SIGHUP)
94+
cw.Cmd.Process.Kill()
95+
return
96+
}
97+
if cw.IsShell {
98+
unixutil.SignalHup(cw.Cmd.Process.Pid)
9799
} else {
98-
cw.Cmd.Process.Signal(syscall.SIGTERM)
100+
unixutil.SignalTerm(cw.Cmd.Process.Pid)
99101
}
100102
go func() {
101103
defer func() {

pkg/util/unixutil/unixutil_unix.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,11 @@ func GetSignalName(sig os.Signal) string {
6060
func SetCloseOnExec(fd int) {
6161
unix.CloseOnExec(fd)
6262
}
63+
64+
func SignalTerm(pid int) error {
65+
return syscall.Kill(pid, syscall.SIGTERM)
66+
}
67+
68+
func SignalHup(pid int) error {
69+
return syscall.Kill(pid, syscall.SIGHUP)
70+
}

pkg/util/unixutil/unixutil_windows.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,16 @@ func GetSignalName(sig os.Signal) string {
2727

2828
func SetCloseOnExec(fd int) {
2929
}
30+
31+
func SignalTerm(pid int) error {
32+
proc, err := os.FindProcess(pid)
33+
if err != nil {
34+
return err
35+
}
36+
return proc.Kill()
37+
}
38+
39+
// this is a no-op on windows
40+
func SignalHup(pid int) error {
41+
return nil
42+
}

0 commit comments

Comments
 (0)