{"action":"created","issue":{"url":"https://api.github.com/repos/chapel-lang/chapel/issues/1531","labels_url":"https://api.github.com/repos/chapel-lang/chapel/issues/1531/labels{/name}","comments_url":"https://api.github.com/repos/chapel-lang/chapel/issues/1531/comments","events_url":"https://api.github.com/repos/chapel-lang/chapel/issues/1531/events","html_url":"https://github.com/chapel-lang/chapel/pull/1531","id":60437540,"number":1531,"title":"Implement isMount","user":{"login":"lydia-duncan","id":2454710,"avatar_url":"https://avatars.githubusercontent.com/u/2454710?v=3","gravatar_id":"","url":"https://api.github.com/users/lydia-duncan","html_url":"https://github.com/lydia-duncan","followers_url":"https://api.github.com/users/lydia-duncan/followers","following_url":"https://api.github.com/users/lydia-duncan/following{/other_user}","gists_url":"https://api.github.com/users/lydia-duncan/gists{/gist_id}","starred_url":"https://api.github.com/users/lydia-duncan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lydia-duncan/subscriptions","organizations_url":"https://api.github.com/users/lydia-duncan/orgs","repos_url":"https://api.github.com/users/lydia-duncan/repos","events_url":"https://api.github.com/users/lydia-duncan/events{/privacy}","received_events_url":"https://api.github.com/users/lydia-duncan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-10T01:30:21Z","updated_at":"2015-03-10T15:32:12Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/chapel-lang/chapel/pulls/1531","html_url":"https://github.com/chapel-lang/chapel/pull/1531","diff_url":"https://github.com/chapel-lang/chapel/pull/1531.diff","patch_url":"https://github.com/chapel-lang/chapel/pull/1531.patch"},"body":"It returns true if the name of a mount point was sent to it, false\r\notherwise.  Like the other is* functions, if the name provided does\r\nnot refer to something that exists, error out.\r\n\r\nDesign decisions: Added a new memory descriptor for clearer error\r\nhandling (CHPL_RT_MD_OS_LAYER_TMP_DATA).  Compared the\r\nstat.st_dev number of the directory and its parent - if they weren't the\r\nsame, we had a mount point.  This would ignore the root case, so\r\nalso checked to make sure they didn't refer to the same directory.  I\r\nalso exited before entering runtime code if the name referred to a file\r\ninstead of a directory, since files can't be mount points.\r\n\r\nThere are two tests: one whether \"/\" is a mount point and one if \"/dev\"\r\nis valid.  I added both because \"/dev\" wasn't present on cygwin, and\r\n\"/\" is treated differently in my implementation because it is a root\r\ndirectory."},"comment":{"url":"https://api.github.com/repos/chapel-lang/chapel/issues/comments/78078740","html_url":"https://github.com/chapel-lang/chapel/pull/1531#issuecomment-78078740","issue_url":"https://api.github.com/repos/chapel-lang/chapel/issues/1531","id":78078740,"user":{"login":"lydia-duncan","id":2454710,"avatar_url":"https://avatars.githubusercontent.com/u/2454710?v=3","gravatar_id":"","url":"https://api.github.com/users/lydia-duncan","html_url":"https://github.com/lydia-duncan","followers_url":"https://api.github.com/users/lydia-duncan/followers","following_url":"https://api.github.com/users/lydia-duncan/following{/other_user}","gists_url":"https://api.github.com/users/lydia-duncan/gists{/gist_id}","starred_url":"https://api.github.com/users/lydia-duncan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lydia-duncan/subscriptions","organizations_url":"https://api.github.com/users/lydia-duncan/orgs","repos_url":"https://api.github.com/users/lydia-duncan/repos","events_url":"https://api.github.com/users/lydia-duncan/events{/privacy}","received_events_url":"https://api.github.com/users/lydia-duncan/received_events","type":"User","site_admin":false},"created_at":"2015-03-10T15:32:12Z","updated_at":"2015-03-10T15:32:12Z","body":"I've tested the false and failing cases to be sure they work (and will again before committing the cleanup you've suggested).  In the interest of getting more file functions in (though the likelihood of getting all I wanted in is now slim to none), I was planning on adding more tests during code freeze instead of right now."}}