Upgrade to current NetBSD popen/pclose.
This gets us back to using vfork now our ARM vfork assembler stub is fixed, and adds the missing thread safety for the 'pidlist'. Bug: 5335385 Change-Id: Ib08bfa65b2cb9fa695717aae629ea14816bf988d
This commit is contained in:
@@ -185,3 +185,15 @@ TEST(stdio, printf_ssize_t) {
|
||||
snprintf(buf, sizeof(buf), "%zd", v);
|
||||
#endif
|
||||
}
|
||||
|
||||
TEST(stdio, popen) {
|
||||
FILE* fp = popen("cat /proc/version", "r");
|
||||
ASSERT_TRUE(fp != NULL);
|
||||
|
||||
char buf[16];
|
||||
char* s = fgets(buf, sizeof(buf), fp);
|
||||
buf[13] = '\0';
|
||||
ASSERT_STREQ("Linux version", s);
|
||||
|
||||
ASSERT_EQ(0, pclose(fp));
|
||||
}
|
||||
|
Reference in New Issue
Block a user