Hi Deb,
Did you ever think of :
open(FH, "< /etc/mnttab");
The only thing a df (or bdf) does is catinating the /etc/mnttab and checking if
the "link" is still there.
This way a hang of a stale nfs-mount won't bother you, but you will be able to
filter it out in the mnttab as it cleary sets an error at the stale nfs-mount line.
It also will save you much time forking and performing a systemcall.
Good luck.
Regs David
----------------------------
>
> Hey Folks,
>
> Recently I had a problem where a *nix system NFS was hung on a server
> which had "gone away," but the client hadn't umounted the filesystem.
>
> Later, this caused a script in cron to fail, in that a df command inside
> the script never completed, and instead it "hung," causing the script
> to hang awaiting a completion of df, which it never got.
>
> 999 times out of 1000 this has not failed, but when that one time
> comes along, all hell breaks loose.
>
> I'm not sure what approach to take to alleviate the cascading failure.
> I'd prefer to just abort the df, log the error, and complete the rest
> of the script. Short of totally re-writing the script (it's not mine,
> to begin with), I would like to modify it. It's a simple system command
> being used:
>
> system ("/usr/sbin/df -kl");
>
>
> Ideas?
>
> Thanks,
>
> deb
>
>
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>
> "Press any key... no, no, no, NOT THAT ONE!!!"
>
> ���
> ~
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]