Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Sun, 6 Nov 2005 23:34:36 -0800 From: Yitzchak Scott-Thoennes To: cygwin AT cygwin DOT com Subject: futimes fails on file open for read Message-ID: <20051107073436.GA7596@efn.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-IsSubscribed: yes The following gives: futimes returned: -1 (Permission denied) I'm told it succeeds on linux; is it even possible for it to work on cygwin or am I SOL? #include #include #include #include #include #include int main(int argc,char **argv) { int fd, ret; struct timeval tv[2] = {{500000000, 0}, {500000000, 0}}; if (system("touch foo") == -1) return 1; if ((fd = open("foo", O_RDONLY)) == -1) return 1; errno = 0; ret = futimes(fd, tv); printf("futimes returned: %d (%s)\n", ret, strerror(errno)); return 0; } -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/