Closed sgielen closed 2 years ago
Looks like the following patch, and remapping stdin to /dev/null
, serves as a workaround:
diff --git a/gow.go b/gow.go
index ba4b853..b1d04f5 100644
--- a/gow.go
+++ b/gow.go
@@ -166,7 +166,7 @@ func main() {
if errors.Is(err, syscall.ENOTTY) {
log.Println("failed to set raw terminal mode: no terminal exists")
} else {
- critical(err)
+ log.Printf("failed to set raw terminal mode: %+v", err)
}
} else {
termios = &state
src$ gow run ./devproxy </dev/null &
[1] 81690
[gow] failed to set raw terminal mode: operation not supported by device
src$ 2021/10/27 16:03:03 Ready for connections on port 8060.
src$ fg
Just pushed a change that allows to avoid using raw mode:
gow -r=false
When false, gow
will not attempt to use raw mode, so you won't even see a warning. Let me know if you run into any issues.
Since there's a working solution, I'll go ahead and close this. Let me know if anything else is required.
Thank you @mitranim, adding -r=false
with the latest version indeed solves the issue :)
Hi! I'm trying to run multiple gow processes in background from a shell script. While testing, I noticed that running gow in a shell background doesn't work:
However, without backgrounding the process runs fine:
I tried to figure out why; the first thing I tried was redirecting stdout and stderr to no avail:
Then, I tried to redirect stdin, but got a different error:
Same with
/dev/zero
.Is it impossible to run
gow
in the background due to how it is written, or is this a bug that could be addressed?