{"action":"closed","issue":{"url":"https://api.github.com/repos/xingheng/ShareMem/issues/1","labels_url":"https://api.github.com/repos/xingheng/ShareMem/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/xingheng/ShareMem/issues/1/comments","events_url":"https://api.github.com/repos/xingheng/ShareMem/issues/1/events","html_url":"https://github.com/xingheng/ShareMem/issues/1","id":23723569,"number":1,"title":"ftruncate failed when truncating the shared objects that has been created.-","user":{"login":"xingheng","id":2891714,"avatar_url":"https://avatars.githubusercontent.com/u/2891714?v=3","gravatar_id":"","url":"https://api.github.com/users/xingheng","html_url":"https://github.com/xingheng","followers_url":"https://api.github.com/users/xingheng/followers","following_url":"https://api.github.com/users/xingheng/following{/other_user}","gists_url":"https://api.github.com/users/xingheng/gists{/gist_id}","starred_url":"https://api.github.com/users/xingheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xingheng/subscriptions","organizations_url":"https://api.github.com/users/xingheng/orgs","repos_url":"https://api.github.com/users/xingheng/repos","events_url":"https://api.github.com/users/xingheng/events{/privacy}","received_events_url":"https://api.github.com/users/xingheng/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2013-12-04T15:41:50Z","updated_at":"2015-09-29T04:28:21Z","closed_at":"2015-09-29T04:28:21Z","body":"int fd = shm_open(uuid, O_RDWR|O_CREAT|O_EXCL, S_IRUSR|S_IWUSR/*, 0666*/);\r\nsize_t shmSize = sizeof(container);\r\nint ret = ftruncate(fd, shmSize);\r\n// success at the first time, ret is 0.\r\nret = ftruncate(fd, shmSize * 2);\r\nperror(errno);\r\n// failure, ret is -1 and output \"Invalid agrument\".\r\n\r\nSee question in stackoverflow: http://stackoverflow.com/questions/20320742/ftruncate-failed-at-the-second-time"}}