Hi, I used to connect to multiple networks with my laptop. The problem is that rpc.umntall(8) automatically tries to send a RPCMNT_UMOUNT to all old entries in /var/db/mounttab. I always need to hit ^C because it takes too long to timeout. I watched at the code to see if I couldn't set a timeout on the sending socket to shorten the amount of time it tries to contact the NFS server of each deprecated mount. It looks there is already a hard-coded timeout of three seconds on the call of clnt_call(3), but I added some printf(3)s and this is obviously the preceding clnt_create(3) call which takes so much time. I looked at the code of this function, and this is not much than a simple wrapper to clnt_create_timed(3) function. So I changed rpc.umntall(3) code to use this function and the same timeout as clnt_call(3) instead of using the non-timed version. This is what this small patch does. It may be worth creating an option for this, I don't know if waiting a big amount of time is relevant in specific some cases. Regards, -- Jeremie Le Hen < jeremie at le-hen dot org >< ttz at chchile dot org >
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:35 UTC