You are not logged in.

#1 2017-08-18 20:05:03

damo
....moderator....
Registered: 2015-08-20
Posts: 6,734

[SOLVED]termite: problem with child processes

If I try to display weather information in a termite terminal I get...

$ termite --hold -e "curl -4 http://wttr.in/"  &

(termite:18858): GLib-WARNING **: GChildWatchSource: Exit status of a child process was requested 
but ECHILD was received by waitpid(). Most likely the process is ignoring SIGCHLD, or some other 
thread is invoking waitpid() with a nonpositive first argument; either behavior can break applications 
that use g_child_watch_add()/g_spawn_sync() either directly or indirectly.

...which displays as termite-scrot.th.png

Using another term I have...

$ rxvt -g 130x42 -hold -e curl -4 http://wttr.in/ &

...which runs OK rxvt-scrot.th.png

Using a different command with termite...

termite --hold -e "curl -4 http://wttr.in/ &"

...it also runs fine termite-scrot-2.th.png

...although it outputs an error at the end of the output: "curl: (6) Could not resolve host: &", and also the GLib error in the terminal it is run from. However, putting "&" outside the quoted command has the previous incomplete output.


Can anyone explain what is happening here, presumably to do with subprocesses?

BL-Helium dev, with termite version:

$ termite -v
termite v12-32-g3c2753b

--- EDIT---  SOLVED smile

Use the bash "disown" command

$ termite --hold -e "curl -4 http://wttr.in/" & disown

I would still like to be educated though wink Why does termite behave differently from other terminal emulators?

And it still doesn't work properly when run from within a script sad

Last edited by damo (2017-08-18 20:25:41)


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#2 2017-08-19 21:05:29

damo
....moderator....
Registered: 2015-08-20
Posts: 6,734

Re: [SOLVED]termite: problem with child processes

damo wrote:

...
And it still doesn't work properly when run from within a script sad

It does if you use...

export arg="$1"
termite --hold -e 'bash -c "curl -4 http://wttr.in/$arg;exec bash"'

Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

Board footer

Powered by FluxBB