xiaoxiang781216 commented on code in PR #3511:
URL: https://github.com/apache/nuttx-apps/pull/3511#discussion_r3328015291
##########
system/popen/popen.c:
##########
@@ -45,17 +46,78 @@
* Private Types
****************************************************************************/
-/* struct popen_file_s is a cast compatible version of FILE that contains
- * the additional PID of the shell processes needed by pclose().
- */
-
struct popen_file_s
{
- FILE copy;
- FILE *original;
+ FAR struct popen_file_s *flink;
+ FAR FILE *stream;
pid_t shell;
};
+/****************************************************************************
+ * Private Data
+ ****************************************************************************/
+
+static sem_t g_popen_sem = SEM_INITIALIZER(1);
+static FAR struct popen_file_s *g_popen_files;
Review Comment:
@michallenc added fopencookie before, you may attach the private data to
FILE by this function:
https://github.com/apache/nuttx/pulls?q=fopencookie
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]