usage of pseudo terminal — C
问题 I created a pThread with a specific session number. If the pThread is spawned I try to get another process running the pseudo terminal launched using openpty . Here is some part of the code: if (openpty(&(numa_pst[session][0]),&(numa_pst[session][1]), NULL, NULL, NULL) != 0) { int err_code = errno; sprintf (line_temp, "*** ERROR: numa openpty failed with:\n%s\n", strerror(err_code)); } session = 0; int* pi = calloc(sizeof(int), 1); *pi = session; if (pthread_create(&system_wideThread[session]