Subject: Hacking rsh to add exit codes.
To: None <firstname.lastname@example.org>
From: Todd Whitesel <email@example.com>
Date: 01/13/2000 00:40:37
Not sure if this is the best list, but I am not on tech-net and this is not
kernel level networking so here goes.
In my quest to use remote execution reliably, I have begun investigating the
possibility of hacking rsh/rshd in order to obtain sources that will do what
I want. Namely, return the exit code of the remote session so if my remote
compile fails, my build stops instead of charging ahead bindly. (Currently
I am using ssh with acceptable success, but nagging problems remain.)
My conclusion is: it's possible. In fact the hardest part is trying to not
salt your local rsh/rshd to be incompatible with the rest of the world. I
plan to use this to build snapshots, so that would be, er, unacceptable.
The protocol would remain like that of rsh except that the stderr return
stream is framed with length bytes so that (a) we know if we were abruptly
shut down, and (b) we know what is user data and what is exit code. A frame
length of zero indicates that one final exit code byte remains in the stream.
I can think of various strategies that involve cloning code, ifdef's, new
service numbers in /etc/services, and so on. But I thought I'd just ask the
wizards (assuming this is the right list on which to find them, of course).
What lessons are out there that I should listen to before deciding to go
ahead with this?
toddpw @ best.com