sandstorm-io/sandstorm — pull request #168 by dwrensha (2014-12-01 19:21:18+00:00)
Title: fix supervisor crash by handling case when st_nlink == 0

I noticed the supervisor crashing with SIGFPE. This fixes the problem.

In case you're curious, here's an strace of the part of `git init --bare` that appears to have triggered the problem:
```
open("/home/david/Desktop/scratch/twhvDvF", O_RDWR|O_CREAT|O_EXCL, 0600) = 3
close(3) = 0
unlink("/home/david/Desktop/scratch/twhvDvF") = 0
symlink("testing", "/home/david/Desktop/scratch/twhvDvF") = 0
lstat("/home/david/Desktop/scratch/twhvDvF", {st_dev=makedev(202, 0), st_ino=1256447, st_mode=S_IFLNK|0777, st_nlink=1, st_uid=1000, st_gid=1001, st_blksize=4096, st_blocks=0, st_size=7, st_atime=2014/12/01-14:05:40, st_mtime=2014/12/01-14:05:40, st_ctime=2014/12/01-14:05:40}) = 0
unlink("/home/david/Desktop/scratch/twhvDvF") = 0
```