然后在Child中,在componentDidMount()中调用该函数,我们可以将值从子级传递到父级,如下所示:...
#include <unistd.h> #include <iostream> #include <sys/wait.h> #include <stdlib.h> using namespace std; int main() { int ret; ret = fork(); if (ret > 0) { cout << "parent start/n"; int status; pid_t pid; pid = wait(&status); if (pid != ret) { cout << "parent w...