From 9d5aa7cbb885563b3e1d8405ffc4663eaaf51dc7 Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 2 Mar 2011 00:33:42 +0000 Subject: Fix pipe/fifo open logic: semaphore wait in open() must abort if a signal is received git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3327 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/fs/fs_open.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'nuttx/fs') diff --git a/nuttx/fs/fs_open.c b/nuttx/fs/fs_open.c index 76b941f95..467eef858 100644 --- a/nuttx/fs/fs_open.c +++ b/nuttx/fs/fs_open.c @@ -1,7 +1,7 @@ /**************************************************************************** * fs_open.c * - * Copyright (C) 2007, 2008, 2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -69,6 +69,10 @@ int inode_checkflags(FAR struct inode *inode, int oflags) } } +/**************************************************************************** + * Name: open + ****************************************************************************/ + int open(const char *path, int oflags, ...) { struct filelist *list; @@ -181,7 +185,7 @@ int open(const char *path, int oflags, ...) errout_with_inode: inode_release(inode); errout: - *get_errno_ptr() = ret; + errno = ret; return ERROR; } -- cgit v1.2.3