Spawn separate process for wakunode2 from Go
Hack to get librln dynamic lib
This commit is contained in:
parent
78968abe1a
commit
454073a978
14
main.go
14
main.go
|
@ -3,8 +3,11 @@ package main
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
"log"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"bytes"
|
"bytes"
|
||||||
|
"os"
|
||||||
|
"os/exec"
|
||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -28,6 +31,17 @@ type DebugResult struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
cmd := exec.Command("./wakunode2")
|
||||||
|
// TODO Redirect to file
|
||||||
|
cmd.Stdout = os.Stdout
|
||||||
|
err := cmd.Start()
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
|
log.Printf("Just ran subprocess %d, exiting\n", cmd.Process.Pid)
|
||||||
|
|
||||||
|
// TODO This should wait a bit
|
||||||
|
// Run this in background
|
||||||
fmt.Println("JSON RPC request: get_waku_v2_debug_v1_info")
|
fmt.Println("JSON RPC request: get_waku_v2_debug_v1_info")
|
||||||
|
|
||||||
data := Payload{
|
data := Payload{
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue