Re: Optimal NFS mount options to safely allow interrupts and timeouts on newer kernels

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 5 Mar 2014 22:47:27 -0500 Jim Rees <rees@xxxxxxxxx> wrote:

> NeilBrown wrote:
> 
>   On Wed, 5 Mar 2014 16:11:24 -0500 Jim Rees <rees@xxxxxxxxx> wrote:
>   
>   > Andrew Martin wrote:
>   > 
>   >   Isn't intr/nointr deprecated (since kernel 2.6.25)?
>   > 
>   > It isn't so much that it's deprecated as that it's now the default (except
>   > that only SIGKILL will work).
>   
>   Not quite correct.  Any signal will work providing its behaviour is to kill
>   the process.  So SIGKILL will always work, and SIGTERM SIGINT SIGQUIT etc
>   will work providing that aren't caught or ignored by the process.
> 
> If that's true, then the man page is wrong and someone should fix it. I'll
> work up a patch if someone can confirm the behavior.

I just mounted a filesystem, turned off my network connection, ran "ls -l" and
then tried to kill the "ls"....
To my surprise, only SIGKILL worked.
I looked more closely and discovered that "ls" catches SIGHUP SIGINT SIGQUIT
SIGTERM, so those signals won't kill it....

So I tried to "cat" a file on the NFS filesystem.  'cat' doesn't catch any
signals.  SIGHUP SIGTERM SIGINT all worked on 'cat'.
'df' also responds to 'SIGINT'.

It would be nice if 'ls' only caught signals while printing (so it can
restore the default colour) and didn't during 'stat' and 'readdir'.  But
maybe no-one cares enough.

So the man page is not quite accurate.

NeilBrown

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux