[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Notifying other processes of bash events.
From: |
Mathew Johnston |
Subject: |
Notifying other processes of bash events. |
Date: |
20 Dec 2001 05:56:30 -0800 |
I'd like to have bash notify another process (a distant parent) of a
working dir change. I've thought of aliasing 'cd', and that works to
a degree, but has the following problem: Consider 3 bash processes (1,
2, 3), nested in a tree with a parent of P. Say, P->1->2->3. I P to
know what the current working directory of the deepest bash process
is. So, when 3 starts up, it needs to send an event somehow to P
describing it's pwd; when 3 does a change of pwd, it needs to notify P
also. When 3 exists, 2 must notify P to say that the process exited,
and describe it's pwd. Using CD, the pwd only gets advertised when
someone manually changes directory. Is there a good way to do this
short of adding event dispatching mechanisms to bash its self?
Thanks,
Mathew Johnston
- Notifying other processes of bash events.,
Mathew Johnston <=