Is this a bug? 2: the return

Rob Landley rob at landley.net
Wed Dec 5 05:21:22 WST 2007


On Tuesday 04 December 2007 05:56:56 Philippe Brand wrote:
> Hello there,
>
> I think I've come accross a problem with dropbear >=0.49, originating
> long time ago from a fix done in 0.49 version abtou FD writability.
> For remote control purpose I'm using dbclient on an appliance (A) to
> send command to another system (B).
>
> A sends to B
> /usr/bin/dbclient -p $someport -y -i /whatever/.ssh/id_rsa
> $someuser@$ip "$cmd"
>
> $cmd holds /usr/local/bin/someutil
>
> someutil is a C compiled program which setuid() then forks and execve a
> shell script. Parent process does not detach from terminal.
> As soon as 'someutil' forks, ssh session ends, but 'someutil' continues
> to run nicely. However I simply loose 'someutil' output.

It's not a question of "fork", it's a question of the parent process exiting.  
When the program you run via ssh exits, ssh should exit.  It doesn't matter 
what background processes it left running.

Does your program do what you want if you use "telnet" instead of ssh?

Rob
-- 
"One of my most productive days was throwing away 1000 lines of code."
  - Ken Thompson.



More information about the Dropbear mailing list