List Info

Thread: progress-bar & fuser




progress-bar & fuser
user name
2006-07-14 01:04:29
Manuel,
   It seems my 'free' time has been allocated for me.. (at
least for the 
next day). I was able to come up with this work-around for
progress-bar.sh
   I won't have time to fully test this out but it looks
ok, could you 
though this code into the svn and test it. This replaces
fuser 
completely in the script.

---cut---
makePID=$(fuser -v . 2>&1 | grep make)
makePID=$(echo $makePID | cut -d" " -f2)
---end cut---

mypid=$$
   # A small ugly.. make is my parent (not root), get its
PID
makePID=`(cat /proc/$mypid/stat) | cut -d " "
-f5`

***
Strictly speaking I am testing the process group id (from
man /proc) but 
that seems to work

   George
-- 
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page
progress-bar & fuser
user name
2006-07-14 11:42:23

George Boudreau wrote:
> Manuel,
>   It seems my 'free' time has been allocated for me..
(at least for the 
> next day). I was able to come up with this work-around
for progress-bar.sh
>   I won't have time to fully test this out but it
looks ok, could you 
> though this code into the svn and test it. This
replaces fuser 
> completely in the script.
> 
> ---cut---
> makePID=$(fuser -v . 2>&1 | grep make)
> makePID=$(echo $makePID | cut -d" " -f2)
> ---end cut---
> 
> mypid=$$
>   # A small ugly.. make is my parent (not root), get
its PID
> makePID=`(cat /proc/$mypid/stat) | cut -d "
" -f5`
   don't commit this code Manuel.. it works most of the
time but not all 
of the time. If locked up during an overnight build.  Back
to the 
drawing board.. *sigh*
> 
> ***
> Strictly speaking I am testing the process group id
(from man /proc) but 
> that seems to work
> 
>   George
-- 
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page
progress-bar & fuser
user name
2006-07-14 14:06:33
On 7/14/06, George Boudreau <georgeblinuxfromscratch.org> wrote:
>
>
> George Boudreau wrote:
> > Manuel,
> >   It seems my 'free' time has been allocated for
me.. (at least for the
> > next day). I was able to come up with this
work-around for progress-bar.sh
> >   I won't have time to fully test this out but it
looks ok, could you
> > though this code into the svn and test it. This
replaces fuser
> > completely in the script.
> >
> > ---cut---
> > makePID=$(fuser -v . 2>&1 | grep make)
> > makePID=$(echo $makePID | cut -d" "
-f2)
> > ---end cut---
> >
> > mypid=$$
> >   # A small ugly.. make is my parent (not root),
get its PID
> > makePID=`(cat /proc/$mypid/stat) | cut -d "
" -f5`
>    don't commit this code Manuel.. it works most of
the time but not all
> of the time. If locked up during an overnight build. 
Back to the
> drawing board.. *sigh*
> >
> > ***
> > Strictly speaking I am testing the process group
id (from man /proc) but
> > that seems to work
> >
> >   George
> --
> http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
> FAQ: http://www.linux
fromscratch.org/faq/
> Unsubscribe: See the above information page
>
-- 
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page
progress-bar & fuser
user name
2006-07-14 19:42:28
El Viernes, 14 de Julio de 2006 13:42, George Boudreau
escribió:

>    don't commit this code Manuel.. it works most of
the time but not all
> of the time. If locked up during an overnight build. 
Back to the
> drawing board.. *sigh*

OK.

I can't think on a failsafe alternative to fuser.

For CLFS-boot builds, and hopping that only the jhalfs make
process will be 
run during the system build, we could to try to use
find+readlink to find if 
there is some /proc/*/exe file pointing to a make binary.
Something like

find /proc -name exe -exec readlink '{}' \; | grep
"make"


-- 
Manuel Canales Esparcia
Usuario de LFS nº2886:       http://www.linuxfroms
cratch.org
LFS en castellano: http://www.escomp
oslinux.org/lfs-es http://www.lfs-es.info
TLDP-ES:                           http://es.tldp.org
-- 
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page
[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )