summaryrefslogtreecommitdiff
path: root/nuttx/fs
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-03-02 00:33:42 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-03-02 00:33:42 +0000
commit9d5aa7cbb885563b3e1d8405ffc4663eaaf51dc7 (patch)
treea89768fa9a4aac8ecc614d06feb525ec35dcc1c2 /nuttx/fs
parentb9fd3d2acfda5074d62e671c6edcdaed9fdc40c9 (diff)
downloadpx4-nuttx-9d5aa7cbb885563b3e1d8405ffc4663eaaf51dc7.tar.gz
px4-nuttx-9d5aa7cbb885563b3e1d8405ffc4663eaaf51dc7.tar.bz2
px4-nuttx-9d5aa7cbb885563b3e1d8405ffc4663eaaf51dc7.zip
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
Diffstat (limited to 'nuttx/fs')
-rw-r--r--nuttx/fs/fs_open.c8
1 files changed, 6 insertions, 2 deletions
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 <spudmonkey@racsa.co.cr>
*
* 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;
}