Skip to content

Commit 20b58a0

Browse files
authored
Add signal stubs (#4270)
os: init signal ignore stub and add other stubs Signed-off-by: leongross <leon.gross@9elements.com>
1 parent bfccf35 commit 20b58a0

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

src/os/exec.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,8 @@ func (p *Process) Kill() error {
7272
func (p *Process) Signal(sig Signal) error {
7373
return ErrNotImplemented
7474
}
75+
76+
func Ignore(sig ...Signal) {
77+
// leave all the signals unaltered
78+
return
79+
}

src/os/signal/signal.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Copyright 2012 The Go Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
4+
5+
package signal
6+
7+
import (
8+
"os"
9+
)
10+
11+
// Just stubbing the functions for now since signal handling is not yet implemented in tinygo
12+
func Reset(sig ...os.Signal) {}
13+
func Ignore(sig ...os.Signal) {}
14+
func Notify(c chan<- os.Signal, sig ...os.Signal) {}

0 commit comments

Comments
 (0)