Makeing the subshell reliable
Oswald Buddenhagen
ossi at kde.org
Wed Jul 19 20:00:11 UTC 2006
On Wed, Jul 19, 2006 at 04:58:16PM +0300, Pavel Tsekov wrote:
> On Tue, 18 Jul 2006, Oswald Buddenhagen wrote:
> >> Shall we keep the prompt in this case ?
> >>
> > i think it would be logical.
>
> But then we shall face the same problems. I mean it is not different
> from what we do now. The only difference is that the output will go
> to the panel directly and no Ctrl+O would be necessary.
>
yup, that's why i said that we have to fix it first in any case. ;)
> >> Reading /proc (if mounted) seems appropriate since it is available
> >> on most of the popular platforms.
> >>
> > in principle yes, but every system has it's own /proc format, which
> > some of are binary.
>
> It's more like reading a symlink. At least the current directory is
> implemented like symlink on the systems I've seen.
>
uhm, indeed, that's generally the case for inodes of any type. this has
to be verified per-system, tough.
some thoughts regarding idleness detection. the shell can be in three
states: idle (just output prompt), busy (after any input until we hit
enter or make it declare itself idle again (ctrl-c)) and inactive (after
enter in non-inactive state, i.e., executing command). in busy state,
ctrl-l has known semantics: it causes all three supported shells to send
us a clearscreen followed by a repaint. when we try to submit a command
but find the shell in busy state, we can issue ctrl-l and capture the
output (i.e., don't display it) and compare it with the prompt we
received. if it is equal, we declare that the shell is in fact idle and
submit the command.
regarding the problem with freebsd, i have to ask again. is this related
to http://mail.gnome.org/archives/mc-devel/2002-August/msg00022.html (how
i initially assumed)? if no, i have to request more info ...
--
Hi! I'm a .signature virus! Copy me into your ~/.signature, please!
--
Chaos, panic, and disorder - my work here is done.
More information about the mc-devel
mailing list